This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB3.0 example

 
santhoshkumar samala
Ranch Hand
Posts: 156
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created an ejb3.0 entity bean example with @ManytoOne relation. Iam getting a strange error



my example code is as follows:
Book.java

Author.java


my stateful session bean has following code :



Iam using Mysql, can you please tell me what can be the fix for this?
 
santhoshkumar samala
Ranch Hand
Posts: 156
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was able to solve the above problem..

I have added above getId method of each entity.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic