Package com.webobjects.eoaccess

Examples of com.webobjects.eoaccess.EOAttribute.entity()


    EREntityStore store = _stores.objectForKey(entity);
    for (EOAttribute attrib : attributesToFetch) {
      if (attrib.isFlattened()) {
        EOAttribute _attrib = entity._attributeForPath(attrib.definition());
        EORelationship _rel = entity._relationshipForPath(attrib.relationshipPath());
        store = join(_rel, store, _stores.objectForKey(_attrib.entity()));
      }
    }
    // We need to check the qualifier for _hiddenRelationships and include them if referenced
//    for (EORelationship rel : (NSArray<EORelationship>) entity._hiddenRelationships()) {
//      if (rel.isFlattened()) {
View Full Code Here


    /* XXX: This assumes that EOF isn't going to try to insert into two different tables at once */
    for (Entry<String, Object> entry : row.entrySet()) {
      EOAttribute attrib = entity.anyAttributeNamed(entry.getKey());
      if (attrib.isFlattened()) {
        EOAttribute _attrib = entity._attributeForPath(attrib.definition());
        target = _attrib.entity();
        newRow.setObjectForKey(entry.getValue(), _attrib.name());
      } else {
        newRow.setObjectForKey(entry.getValue(), attrib.name());
      }
    }
View Full Code Here

            EOAttribute sourceAttribute = join.sourceAttribute();
            EOAttribute destinationAttribute = join.destinationAttribute();
            if (sourceAttribute != null && destinationAttribute != null) {
              if (ObjectUtils.notEqual(sourceAttribute.className(), destinationAttribute.className()) || ObjectUtils.notEqual(sourceAttribute.valueType(), destinationAttribute.valueType())) {
                if (!ERXProperties.booleanForKey("er.extensions.ERXModelGroup." + sourceAttribute.entity().name() + "." + sourceAttribute.name() + ".ignoreTypeMismatch")) {
                  throw new RuntimeException("The attribute " + sourceAttribute.name() + " in " + sourceAttribute.entity().name() + " (" + sourceAttribute.className() + ", " + sourceAttribute.valueType() + ") is a foreign key to " + destinationAttribute.name() + " in " + destinationAttribute.entity().name() + " (" + destinationAttribute.className() + ", " + destinationAttribute.valueType() + ") but their class names or value types do not match.  If this is actually OK, you can set er.extensions.ERXModelGroup." + sourceAttribute.entity().name() + "." + sourceAttribute.name() + ".ignoreTypeMismatch=true in your Properties file.");
                }
              }
            }
          }
        }
View Full Code Here

                      }
                    }
                    else {
                      flattenPrototypeAttribute(prototypeAttribute, attribute);
                      if (log.isDebugEnabled()) {
                        log.debug("Flattening " + model.name() + "/" + entity.name() + "/" + attribute.name() + " with the prototype attribute " + prototypeAttribute.entity().model().name() + "/" + prototypeAttribute.entity().name() + "/" + prototypeAttribute.name());
                      }
                    }
                  }
                }
                else {
View Full Code Here

                      }
                    }
                    else {
                      flattenPrototypeAttribute(prototypeAttribute, attribute);
                      if (log.isDebugEnabled()) {
                        log.debug("Flattening " + model.name() + "/" + entity.name() + "/" + attribute.name() + " with the prototype attribute " + prototypeAttribute.entity().model().name() + "/" + prototypeAttribute.entity().name() + "/" + prototypeAttribute.name());
                      }
                    }
                  }
                }
                else {
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.