RE: YADSQ. yet another dumb subclass question
"Anderson, Ken" <[email protected]> Fri, 11 Mar 2005 10:38:54 -0500
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
Thomas, First off, you have to make sure that every sub-entity of BARCODE has a = single '=3D' qualifier in the Qualifier field like CATEGORY =3D 'ABC'. = You should also make sure the super entity (BARCODE itself), has a = qualifier that will not match anything, like CATEGORY =3D 'NONE'. That should result in a single query. Can you tell us how you're = fetching the BARCODE EO? Ken -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Thomas Ganter Sent: Friday, March 11, 2005 9:34 AM To: [email protected] Subject: YADSQ. yet another dumb subclass question Hello world,=20 perhaps I again answer my own question, but please confirm that I am not = overseeing something here:=20 I want to add barcode support for a system that supports multiple types = of products that have completely different attributes and data models = (and thus are stored in completely different tables).=20 Barcodes are supposed to be stored in a database table, called BARCODE.=20 BARCODE is (besides the barcode information) having two fields, one = being PRODUCT_CATEGORY and the other one being PRODUCT_ID.=20 Now, the Idea was to have subclasses of BARCODE, one for each category = (using appropriate, disjoint qualifiers) that, in turn, each have a = relationship to another product main description table (or whatever) = using the PRODUCT_ID as a foreign key.=20 Ideally, I then can retrieve one record from "BARCODE" which will by its = Java class already know its type and the to_product() relationship will = automatically retrieve the correct data.=20 Unfortunately, I cannot get this to work properly (i.e. without multiple = round trips to the database just for one fetch specification).=20 Is this not possible, or am I simply missing something here? Greetings,=20 - Thomas _______________________________________________ EOF mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/eof