well, when you model a many2many relationship this is written like that in the hbm.xml, when hibernate reads it to generate the DDL it will imply the join-table
what you are trying to achieve should be done using association classes, but unfortunately there's isn't good support for that in UML tools (MagicDraw included) otherwise we would have included support already (to give you one reason: I need it myself :-) ) to answer your question, are you sure it's doing two calls ? I would expect one: only the one to fetch B, normally speaking (assuming you did not write the HQL yourself) when you load B all its attributes are loaded too so I would expect eagerly loading B from A would not perform any DB query at all when doing a.getB().getId() so are you sure it's doing two calls when A lazily loads B ? -- Wouter Zoons - [EMAIL PROTECTED] http://www.andromda.org/ _________________________________________________________ Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=1392#1392 Posting to http://forum.andromda.org/ is preferred over posting to the mailing list! ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user