Re: Dumb (?) subclass question
Thomas Ganter <[email protected]> Fri, 7 Jan 2005 11:04:11 +0100
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
Hi Chuck, I can rule out to accidentially create duplicates. There is no way where this could happen. And this reproducably happens for every single items() relationship I do on any arbitrary HEAD element. In my EO subclass of ITEM, which is ITEM_E, I have entered the qualifier "(typ='E')" in the advanced entity inspector, with "typ" being a class property. The idea is to have items() retrieve all ITEM elements, whereas item_es() only retrieve special ones. Do I need to have a qualifier in the "ITEM" properties as well? Greetings, - Thomas Am 07.01.2005 um 03:12 schrieb Chuck Hill: > Yes, you probably did something wrong in setting up the subclass. We > will need more details (single table, vertical, horizontal > inheritance) to discern why. As a guess, you forgot the restricting > qualifier. > > If not that, then perhaps you are manually adding a duplicate in your > code though incorrect use of EOF? > > Chuck > > > On Jan 6, 2005, at 5:08 PM, Thomas Ganter wrote: > >> Hi all, >> >> I just spent four hours searching for a bug when I found a situation >> in which a to-many relationship always contained duplicate elements. >> I always was under the impression that the array I get will contain >> distinct rows and never checked for duplicates. >> >> Let's say there are two tables: HEAD and ITEM with a 1:n relationship. >> >> Whenever I say (HEAD)h.items(), I get four entries in the NSArray >> when in the database there are only three. >> >> Could this be somehow due to the fact that i sublassed ITEM? >> >> If so, how can I prevent this behaviour? >> >> Greetings, >> >> - Thomas >> >> _______________________________________________ >> EOF mailing list >> [email protected] >> http://www.omnigroup.com/mailman/listinfo/eof >> > -- > Practical WebObjects - a book for intermediate WebObjects developers > who want to increase their overall knowledge of WebObjects, or those > who are trying to solve specific application development problems. > http://www.global-village.net/products/practical_webobjects > > >