This one time, at band camp, Mattias Campe said: MC>Mattias Campe wrote: MC>> Ralf Joachim wrote: MC>> <snip problems with many-to-many relationship> MC>> MC>>> Have you had a look a the example shiped with castor source archiv. The MC>>> important files for you are in directories 'src/examples/jdo' and MC>>> 'src/examples/myapp'. See Product and Categorie for a many-many MC>>> relationship example. MC>> MC>> MC>> Thx a lot for pointing me at this example, it was of great help for me. MC>> Now I think everything works fine :)! MC> MC>Sorry, I still seem to have a problem :(. I can succesfully receive a MC>list of all employees belonging to a particular Department, but the MC>reverse failes. So finding out to which departments an Employee belongs MC>causes problems, it even seems to modify the tables :(. MC> MC>I have a solution, but I don't know if it is a good one: I would make to MC>tables: next to category_prod, I would also make a table prod_category MC>(+add this to the mapping), which would (I think) solve my problem. It's MC>only, this doesn't seem very elegant to me :(.
Mattias, This is not the solution to your problem. You've already got a bridge table that maps Employee objects to Department objects. I'm willing to bet that your problem resides with the your objects using bi-directional relationships (http://www.castor.org/jdo-faq.html#bi-directional). You've already established that you have a reference from Department to Employee. But do you have a reference from Employee to Department? Bruce -- perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");' ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
