• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB 3.0 and ManyToMany relationship

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have problems with ManyToMany relationships in EJB 3.0 (JBoss 4.0.3RC1)

Consider the following example:

class Book:



class BookAuthor:


I don't know how to add a book and it's author.
If I add a book do I have to create a Set that holds all the authors? And do I have to add that book to the books Set of the author bean?
I have absolutely no idea how this works. I didn't find a good tutorial (not even on the JBoss website) with google.

Hope that somebody can explain me how it works.

Thanks,
Gerald
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i advise u read <<hibernate in action >>
it is a good bible and u will find more detailed discription for your question.
 
author
Posts: 304
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gerald,

Here is another EJB 3.0 preview that has tutorials and will help you
learn how to use EJB 3 mappings:

http://www.oracle.com/technology/tech/java/ejb30.html

Try that out.

-Mike

BTW, Haibo, Hibernate in Action has nothing to do with EJB 3.
 
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic