Arseni Bulatski created CAY-2488: ------------------------------------ Summary: Problem with not to PK relationships Key: CAY-2488 URL: https://issues.apache.org/jira/browse/CAY-2488 Project: Cayenne Issue Type: Bug Components: Core Library Reporter: Arseni Bulatski Fix For: 4.2.M1
Problem with not to PK relationships was found. * create relationship with join not to PK (target or source attribute isn't PK) in modeler * create entities * create relationship between entities * commit changes In database objects will be created, but relationship won't be created. So you can't be able to get joined objects. This happens because in you can't create arcDiff. Look DataDomainDBDiffBuilder if (!relationship.isToMany() && relationship.isToPK()) { doArcCreated(targetNodeId, arcId); } In current logic you can get only PK attribute value from ObjectId. First step is to add validation of this case to prevent user to create this kind of relationship. -- This message was sent by Atlassian JIRA (v7.6.3#76005)