Examples of anyRelationshipNamed()


Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

    if (fetchedObjects.isEmpty()) {
      return NSArray.EmptyArray;
    }

    EORelationship destRelationship = joinEntity.anyRelationshipNamed(toDestKey);
    sourceAttribute = destRelationship.sourceAttributes().get(0).name();
    destinationAttribute = destRelationship.destinationAttributes().get(0).name();
    NSArray<Object> destValues = (NSArray<Object>) fetchedObjects.valueForKey(sourceAttribute);
    EOEntity destEntity = relationship.destinationEntity();
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

                                if (!_warned.containsObject(entityName)) {
                                    log.error("We currently don't support unsaved related objects for this entity: " + entityName);
                                    _warned.addObject(entityName);
                                }
                            } else {
                                EORelationship rel = source.anyRelationshipNamed(key);
                                EOKeyGlobalID sourceGlobalID = (EOKeyGlobalID) ec.globalIDForObject(eo);
                                // AK: I wish I could, but when a relationship
                                // is
                                // not a class prop, there's nothing we can do.
                                // value =
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

            ? relationshipKey
            : relationshipKey.substring( relationshipKey.lastIndexOf( "." ) + 1 );
        r = rightEntity.anyRelationshipNamed( relationshipKey );
        // fix from Michael Müller for the case Foo.fooBars.bar has a Bar.foo relationship (instead of Bar.foos)
        if( r == null || r.destinationEntity() != leftEntity ) {
            r = leftEntity.anyRelationshipNamed( relationshipKey );
        }
        //timc 2006-02-26 IMPORTANT or quotes are ignored and mixed case field names won't work
        String rightTable;
        String leftTable;
        if(enableIdentifierQuoting()) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

        NSArray<String> keys = NSArray.componentsSeparatedByString(keyPath, ".");
        EOEntity ent = entity();
       
        for (int i = 0; i < keys.count(); i++) {
            String k = keys.objectAtIndex(i);
            EORelationship rel = ent.anyRelationshipNamed(k);
            if (rel == null) {
                // it may be an attribute
                if (ent.anyAttributeNamed(k) != null) {
                    break;
                }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

                 String attributeName = (String) path.lastObject();
               String prefix = "";
                 if(path.count() > 1) {
                     for (int i = 0; i < path.count() - 1; i++) {
                         String part = (String) path.objectAtIndex(i);
                         EORelationship rel = entity.anyRelationshipNamed(part);
                         entity = rel.destinationEntity();
                         prefix += part + ".";
                     }
                 }
                     if(entity.attributeNamed(attributeName) == null) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

            // Walk the key path to the last entity.
            if (baseKeyPath != null) {
                for (String path : NSArray.componentsSeparatedByString(baseKeyPath, ".")) {
                    if (null == relationship) {
                        relationship = baseEntity.anyRelationshipNamed(path);
                    } else {
                        relationship = relationship.destinationEntity().anyRelationshipNamed(path);
                    }
                }
            }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

            EORelationship rel;
            EOAttribute att;
            NSMutableArray<EOProperty> path = new NSMutableArray<EOProperty>();
            int numPieces = pieces.count();

            if (numPieces == 1 && null == entity.anyRelationshipNamed(name)) {
                att = entity.anyAttributeNamed(name);
                if (null == att) { return null; }
                return expression.sqlStringForAttribute(att);
            }
           
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

                if (null == att) { return null; }
                return expression.sqlStringForAttribute(att);
            }
           
            for (int i = 0; i < numPieces - 1; i++) {
                rel = entity.anyRelationshipNamed(pieces.objectAtIndex(i));
                if (null == rel) {
                    return null;
                }
                path.addObject(rel);
                entity = rel.destinationEntity();
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

                path.addObject(rel);
                entity = rel.destinationEntity();
            }

            String key = pieces.lastObject();
            if (entity.anyRelationshipNamed(key) != null) { // Test first for a relationship.
                rel = entity.anyRelationshipNamed(key);
                if (rel.isFlattened()) {
                    String relPath = rel.relationshipPath();
                    for (String relPart : NSArray.componentsSeparatedByString(relPath, ".")) {
                        rel = entity.anyRelationshipNamed(relPart);
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

                entity = rel.destinationEntity();
            }

            String key = pieces.lastObject();
            if (entity.anyRelationshipNamed(key) != null) { // Test first for a relationship.
                rel = entity.anyRelationshipNamed(key);
                if (rel.isFlattened()) {
                    String relPath = rel.relationshipPath();
                    for (String relPart : NSArray.componentsSeparatedByString(relPath, ".")) {
                        rel = entity.anyRelationshipNamed(relPart);
                        path.addObject(rel);
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.