> I'm using xdoclet to generate the ejb-jar.xml file. When you are > generating the accessor methods it automaticly assumes that > the accessor > name matches the database column name. So in your example by > default it > is looking for a database columns named composer and performer. > > This is a packaging issue, ie how much work and how confusing > is it to > generate the ejb-jar.xml files. From my point of view I think > that the > simplist case is that each database column has a matching > get/set method > . So in xdoclet .. > > Musician { > > String name; // pk > /** > @ejb:persist-field > @ejb:relation name="songs_composer" > */ > Collection getComposedSongs(); > } > > CDTrack { > String uuid; // pk > /** > @ejb:persist-field > @ejb:relation name="songs_composer" > */ > Musician getComposer(); > } > > Generates > <ejb-relation> > <ejb-relation-name>songs_composer</ejb-relation-name> > > <ejb-relationship-role> > <multiplicity>Many</multiplicity> > <relationship-role-source> > <ejb-name>CDTrack</ejb-name> > </relationship-role-source> > <cmr-field> > <cmr-field-name>composer</cmr-field-name> > </cmr-field> > </ejb-relationship-role> > > <ejb-relationship-role> > <multiplicity>One</multiplicity> > <relationship-role-source> > <ejb-name>Musician</ejb-name> > </relationship-role-source> > <cmr-field> > <cmr-field-name>CDTrack</cmr-field-name> > <cmr-field-type>java.util.Collection</cmr-field-type> > </cmr-field> > </ejb-relationship-role> > > </ejb-relation> > > Tables .. > > Musician { > String name; > } > > CDTrack { > String uuid; > String composer; > } > > > Got it? >
So what is the problem? Table mapping is an implementation detail. Does the above not deploy? Is ejb-doclet generating bad ddl? -dain _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development