Package org.apache.cayenne.map

Examples of org.apache.cayenne.map.DbRelationship.addJoin()


        dbEntity1.addRelationship(rel1To2);
        DbRelationship rel2To1 = new DbRelationship("rel2To1");
        rel2To1.setSourceEntity(dbEntity2);
        rel2To1.setTargetEntity(dbEntity1);
        rel2To1.setToMany(false);
        rel2To1.addJoin(new DbJoin(rel2To1, e2col2.getName(), e1col1.getName()));
        dbEntity2.addRelationship(rel2To1);
        assertSame(rel1To2, rel2To1.getReverseRelationship());
        assertSame(rel2To1, rel1To2.getReverseRelationship());

        // create ObjEntities
View Full Code Here


                                .get("destinationAttribute");

                        join.setTargetName(columnName(
                                targetAttributes,
                                targetAttributeName));
                        dbRel.addJoin(join);
                    }
                }
            }

            // only create obj relationship if it is a class property
View Full Code Here

    // isMandatory?
    // relationship.joinSemantic() ?

    for (EOJoin join : relationship.joins()) {
      DbJoin dbJoin = new DbJoin(dbRelationship, join.sourceAttribute().columnName(), join.destinationAttribute().columnName());
      dbRelationship.addJoin(dbJoin);
    }
   
    if (entity.classPropertyNames().contains(relationship.name())) {
      ObjRelationship objRelationship = new ObjRelationship(relationship.name());
      objRelationship.setSourceEntity(objEntity);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.