Hi, > As you can see on the picture i adopted your t_ prefix for tables :-) It makes > the repository.xml a lot easier to read! I hope you don't have a copyright on it ;-)
Yes. Well, I also got sick of playing with tables named 'user' and 'group' in projects - they need to be specified as '[user]' and '[group]' in SQL for a number of dbms'... > To remove any potential for misunderstanding (and since I'm a visual person :-)) > I uploaded a new version of the data model picture: > http://homepage.hispeed.ch/tabalooga/datamodel-redesign.jpg Hmmm... now I'm confused again. :) Ah, you snuck in some other changes - keyword now relates to pal_model? Or maybe not... *** Assuming you want keyword and pal_model separate *** There's no need to define SupportItemI as a class with a table since it has no fields. It just tells OJB that Document and Download are related and can be referred to by other persistent classes as a SupportItemI Now ignoring role, category, user_role, and user: Tables required: T_download T_document T_pal_model T_pal_model_supportitem T_keyword_supportitem Java Classes required: SupportItemI Interface Download (implements SupportItemI) Document (implements SupportItemI) Pal_model Keyword OJB Repository: <class-descriptor class="SupportItemI"> <extent-class class-ref="document"/> <extent-class class-ref="download"/> </class-descriptor> <class-descriptor class="pal_model" table="t_pal_model"> ... Field Descriptors ... <collection descriptor name="collectionOfSupportItemIs" element-class-ref="SupportItemI" indirection-table="t_pal_model_supportitems" > <fk-pointing-to-this-class column="model_id"/> <fk-pointing-to-element-class column="SupportItemID"/> </collection-descriptor> </class-descriptor> <class-descriptor class="keyword" table="t_keyword"> ... Field Descriptors ... <collection descriptor name="collectionOfSupportItemIs" element-class-ref="SupportItemI" indirection-table="t_keyword_supportitems" > <fk-pointing-to-this-class column="keyword_id"/> <fk-pointing-to-element-class column="SupportItemID"/> </collection-descriptor> </class-descriptor> <class-descriptor class="download" table="t_download"> ... Field Descriptors ... <collection-descriptor name="models" element-class-ref="pal_model" indirection-table="t_pal_model_supportitems" > <fk-pointing-to-this-class column="SupportItemID"/> <fk-pointing-to-element-class column="model_id"/> </collection-descriptor> <collection-descriptor name="keywords" element-class-ref="keyword" indirection-table="t_keyword_supportitems" > <fk-pointing-to-this-class column="SupportItemID"/> <fk-pointing-to-element-class column="keyword_id"/> </collection-descriptor> </class-descriptor> <class-descriptor class="document" table="t_document"> ... Field Descriptors ... <collection-descriptor name="models" element-class-ref="pal_model" indirection-table="t_pal_model_supportitems" > <fk-pointing-to-this-class column="SupportItemID"/> <fk-pointing-to-element-class column="model_id"/> </collection-descriptor> <collection-descriptor name="keywords" element-class-ref="keyword" indirection-table="t_keyword_supportitems" > <fk-pointing-to-this-class column="SupportItemID"/> <fk-pointing-to-element-class column="keyword_id"/> </collection-descriptor> </class-descriptor> -----Original Message----- From: Patrick Scheuerer [mailto:[EMAIL PROTECTED] Sent: Tuesday, 6 January 2004 11:38 a.m. To: OJB Users List Subject: Re: How to combine two non-decomposed m:n mappings in one collection? Coup, Robert Muir wrote: > Well, I would call it t_pal_model_supportitemI, and its a replacement > for t_pal_model_document AND t_pal_model_download I guess that's what I wanted to say :-) > Tell us how you get on. To remove any potential for misunderstanding (and since I'm a visual person :-)) I uploaded a new version of the data model picture: http://homepage.hispeed.ch/tabalooga/datamodel-redesign.jpg Patrick --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]