Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help with outer join in Hibernate

 
Steve Vittoria
Ranch Hand
Posts: 35
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I'm joining two tables, Document table and oword_Service_Code table on the column called service_code. The thing is that I can have a service_code that exists in the document table but not in the oword_Service_Code table. This is causing me to get javax.persistence.EntityNotFoundException errors.

This is how I'm joining the two tables...


Should I be adding some annotation that would avoid this error?

Thanks!
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have a look at the nullable=true attribute
 
Steve Vittoria
Ranch Hand
Posts: 35
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried doing the following...



but I still get javax.persistence.EntityNotFoundException error.

I also tried adding optional = true to @ManyToOne, but still the same error.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This applicable to your situation?
https://community.jboss.org/message/522967

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic