• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

one to many unidirectional : getting null

 
ambar patil
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have mapping like these one to many unidirectional + list)
@OneToMany(fetch = FetchType.EAGER)
@IndexColumn(name = "SORT_VALUE",nullable = false)
@Cascade( { org.hibernate.annotations.CascadeType.ALL,
org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
@JoinColumn(name = "R_ID")
List getMyObject()...

Also I have same @OneToMany mappings with others object ..
but I am gettting desired records + null records too ?
any idea why ?
 
Shailesh Kini
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ambar,

I am sure Hibernate comes with a property that logs the sql being executed behind the scenes. You may want to look at that to debug. It might be a data issue but I can't tell for sure. You will have to provide additional details.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic