@Deprecated public class ERDSmartRelationshipAssignment extends ERDAssignment
An entity A has a relationship b to an entity B, which has a subentity B1. B1 has a relationship k, which B does not have. If in an inspect page for entity A, you use b.k as a display key, then the D2W rules which are based on d2wContext.relationship will not fire properly. This is because relationship is null, instead of containing <EORelationship entity=B1 name=k>. The reason D2W does not find it is that it uses the Model to find out the EORelationship and starts from A. Following the relationship b, gives a B, and asking B for a relationship named k returns null and you lose.
EOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support| Modifier and Type | Field and Description |
|---|---|
static NSArray |
_DEPENDENT_KEYS
Deprecated.
holds the array of dependent keys
|
D2WContextClassArray, log_CLASS| Constructor and Description |
|---|
ERDSmartRelationshipAssignment(EOKeyValueUnarchiver u)
Deprecated.
Public constructor
|
ERDSmartRelationshipAssignment(java.lang.String key,
java.lang.Object value)
Deprecated.
Public constructor
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
Deprecated.
Static constructor required by the EOKeyValueUnarchiver
interface.
|
NSArray |
dependentKeys(java.lang.String keyPath)
Deprecated.
Implementation of the
ERDComputingAssignmentInterface. |
java.lang.Object |
smartRelationship(com.webobjects.directtoweb.D2WContext c)
Deprecated.
Resolves the
EORelationship in a smarter manner using
the current object from the context as well as the propertyKey
to determine the current relationship. |
booleanContextValueForKey, fire, keyForMethodLookup, localizedTemplateStringForKeyInContext, localizedValueForKeyInContext, localizedValueForKeyWithDefaultInContext, localizerForContext, logDeprecatedMessagepublic static final NSArray _DEPENDENT_KEYS
public ERDSmartRelationshipAssignment(EOKeyValueUnarchiver u)
u - key-value unarchiver used when unarchiving
from rule files.public ERDSmartRelationshipAssignment(java.lang.String key,
java.lang.Object value)
key - context keyvalue - of the assignmentpublic static java.lang.Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
eokeyvalueunarchiver - to be unarchivedpublic NSArray dependentKeys(java.lang.String keyPath)
ERDComputingAssignmentInterface. This
assignment depends upon the context keys: "propertyKey" and
"object.entityName". This array of keys is used when constructing the
significant keys for the passed in keyPath.keyPath - to compute significant keys for.public java.lang.Object smartRelationship(com.webobjects.directtoweb.D2WContext c)
EORelationship in a smarter manner using
the current object from the context as well as the propertyKey
to determine the current relationship. Works even with inheritance.c - current D2W contextCopyright © 2002 – 2022 Project Wonder.