Re: Inheritance and relationships
Re: Inheritance and relationships
- Subject: Re: Inheritance and relationships
- From: Guido Neitzer <email@hidden>
- Date: Fri, 8 Aug 2008 14:46:56 -0600
Hmmm. Back to the old application, FETCHING works now. Resolving a
relationship to an object that was NOT cached earlier, crashes.
When I do a fetch, the relationship is resolved just fine when the
object the relation is pointing to was fetched before. But it stops
working as soon as the timestamp lag is reached.
Weird.
cug
On 08.08.2008, at 12:31, Guido Neitzer wrote:
Update:
I have copied the affected models to a test app, deleted all other
entities and all relationships and there it works fine. WTF???
More digging ...
cug
On 08.08.2008, at 12:15, Guido Neitzer wrote:
On 08.08.2008, at 11:11, Mike Schrag wrote:
* triple check that all your restricting qualifiers are set
Done. Seems all correct. That was my first thought.
* check that the restricting qualifier on your base class is set
if it's not abstract
It was not set, but the entity is abstract. To make that clear what
I'm dealing with (in that application, problem is everywhere the
same):
Contact (abstract) -> Person -> BaseUser -> EventsUser
Restricting qualifier is set everywhere. I've just added it to
Contact. But that one is abstract, so it doesn't matter.
* check that your restricting qualifier attributes are inherited
in all the base classes (EM should not allow this NOT to be the
case, but who knows)
Checked, and it's there.
* check that your restricting qualifier attributes are class
properties
They are. Everywhere.
* are you using wonder's automatic restricting qualifier attribute
settings? did you mean to have it on and you don't?
No. I have my ancient EVGenericRecord that does in init:
// set the inheritance type for entity inheritance
if (this.attributeKeys().containsObject("inheritanceType")) {
this.takeValueForKey (entity().name(), "inheritanceType");
}
And right now, I'm only reading existing values from the database.
No luck.
* double check that the type of your pk columns match the database
-- that you're not mixing int and long here ... I think chuck ran
into something crazy with this once.
contact_id is a "big int" from PostgreSQL and defined as a long in
the model. That always worked for me.
* ..... profit?
Profit?
cug
--
http://www.event-s.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
http://www.event-s.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
http://www.event-s.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden