Horizontal mapping and to-one relationships
Horizontal mapping and to-one relationships
- Subject: Horizontal mapping and to-one relationships
- From: Ricardo Strausz <email@hidden>
- Date: Fri, 20 Feb 2004 12:54:47 -0600
Hola!
I hope some guru can help me with this.
I have an abstract class (say Catalog) with to concrete subclasses (say
Seler and Place). The concrete subclases "lived" before inheritance was
possible, so they have common PKs (say there is a Seler.PK == 6 ==
Place.PK). Furthermore, there is another class (say Document) which has
a to-one to each of these classes (i.e. it has a Document.seler AND
Document.place).
While doing statistics in Documents, I have to fetch all documents in a
range of dates, sort them by some catalog (say first by Seler) and
print some data which traverses the relation (say
document.seler.name()). If, after that, I change the sort ordering (now
by Place) and do the same, all objects from Seler with the same PK as a
Place wil be used, instead of those of the Seler class/entity...
Up to here, it was easy to imagine that, since both classes inherits
from Catalog, their globalIDs may be the same (which as far as I
undestand encodes the class and PK in a single "thing"). So I tried to
refault, forget, invalidate the object (via the respectives methods in
the editingContext) but, so far, the same mistake is happenning: if I
ask for document.place.name() it returns the document.seler.name(),
where seler.pk == place.pk...
Any Idea?
Dino
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.