Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 3.0 and ManyToMany relationship  RSS feed

 
Gerald Holl
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
 
Haibo Wang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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.
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!