On 04/11/2008, at 12:25 AM, Ken Anderson wrote:
Could you post the details of the area of your model that's in question? There's obviously something wrong going on...just not easy to decipher without the raw data.
This is Person.plist, the abstract parent:
{
attributes = (
{
columnName = "contact_details_id";
externalType = int4;
name = contactDetailsID;
prototypeName = id;
},
{allowsNull = Y; columnName = dob; name = dob; prototypeName = date; },
{
allowsNull = N;
columnName = "first_name";
name = firstName;
prototypeName = contactDetailsString;
},
{columnName = id; externalType = int4; name = id; prototypeName = id; },
{columnName = "last_login"; name = lastLogin; prototypeName = timestamp; },
{
allowsNull = N;
columnName = "last_name";
name = lastName;
prototypeName = contactDetailsString;
},
{
columnName = "last_pw_change";
name = lastPWChange;
prototypeName = timestamp;
},
{
columnName = "org_id";
externalType = int4;
name = orgId;
prototypeName = id;
},
{
allowsNull = N;
columnName = password;
name = password;
prototypeName = contactDetailsString;
},
{
columnName = "status_id";
externalType = int4;
name = statusID;
prototypeName = id;
},
{
allowsNull = N;
columnName = username;
name = username;
prototypeName = contactDetailsString;
}
);
attributesUsedForLocking = (id);
className = "net.logicsquad.webobjects.auth.model.auth.Person";
classProperties = (
contactDetails,
dob,
firstName,
lastLogin,
lastName,
lastPWChange,
organisation,
password,
personRoles,
status,
username,
userPreferences
);
externalName = person;
fetchSpecificationDictionary = {};
isAbstractEntity = Y;
name = Person;
primaryKeyAttributes = (id);
relationships = (
{
deleteRule = EODeleteRuleCascade;
destination = ContactDetails;
isMandatory = Y;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = contactDetailsID; });
name = contactDetails;
},
{
destination = Organisation;
isMandatory = Y;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = orgId; });
name = organisation;
},
{
deleteRule = EODeleteRuleCascade;
destination = PersonRole;
isMandatory = N;
isToMany = Y;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = personID; sourceAttribute = id; });
name = personRoles;
},
{
destination = Status;
isMandatory = Y;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = statusID; });
name = status;
},
{
destination = UserPreference;
isToMany = Y;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = personID; sourceAttribute = id; });
name = userPreferences;
}
);
}
In the application's index.eomodeld is this:
entities = (
{
className = "net.logicsquad.am.model.auth.AMPerson";
name = AMPerson;
parent = Person;
}
);
And then AMPerson.plist:
{
attributes = (
{
columnName = "contact_details_id";
externalType = int4;
name = contactDetailsID;
prototypeName = id;
},
{allowsNull = Y; columnName = dob; name = dob; prototypeName = date; },
{
allowsNull = N;
columnName = "first_name";
name = firstName;
prototypeName = contactDetailsString;
},
{externalType = int4; name = id; prototypeName = id; },
{columnName = "last_login"; name = lastLogin; prototypeName = timestamp; },
{
allowsNull = N;
columnName = "last_name";
name = lastName;
prototypeName = contactDetailsString;
},
{
columnName = "last_pw_change";
name = lastPWChange;
prototypeName = timestamp;
},
{
columnName = "org_id";
externalType = int4;
name = orgId;
prototypeName = id;
},
{
allowsNull = N;
columnName = password;
name = password;
prototypeName = contactDetailsString;
},
{
columnName = "status_id";
externalType = int4;
name = statusID;
prototypeName = id;
},
{
allowsNull = N;
columnName = username;
name = username;
prototypeName = contactDetailsString;
}
);
attributesUsedForLocking = (id);
className = "net.logicsquad.am.model.auth.AMPerson";
classProperties = (
contactDetails,
dob,
firstName,
lastLogin,
lastName,
lastPWChange,
organisation,
password,
personRoles,
status,
surveyInstances,
surveys,
username,
userPreferences
);
externalName = amperson;
fetchSpecificationDictionary = {};
name = AMPerson;
parent = Person;
primaryKeyAttributes = (id);
relationships = (
{
deleteRule = EODeleteRuleCascade;
destination = ContactDetails;
isMandatory = Y;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = contactDetailsID; });
name = contactDetails;
},
{
destination = Organisation;
isMandatory = Y;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = orgId; });
name = organisation;
},
{
destination = PersonRole;
isToMany = Y;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = personID; sourceAttribute = id; });
name = personRoles;
},
{
destination = Status;
isMandatory = Y;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = statusID; });
name = status;
},
{
destination = SurveyInstance;
isToMany = Y;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = personID; sourceAttribute = id; });
name = surveyInstances;
},
{
destination = Survey;
isToMany = Y;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = creatorID; sourceAttribute = id; });
name = surveys;
},
{
destination = UserPreference;
isToMany = Y;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = personID; sourceAttribute = id; });
name = userPreferences;
}
);
}
Sorry about the length. Thanks to anyone who can take a look.