Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate bidirectional manyToOne: How to get Index easily.

 
Manuel Petermann
Ranch Hand
Posts: 177
Hibernate Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again.
Lets say we got a customer with orders attached to it.


So is there an easier way than doing:


in an instance of Order. Because that seems to be a little too excessive.
All I want is the index in the array.

Thanks.
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you frequently need this then it might better to have a method for just that?
 
Manuel Petermann
Ranch Hand
Posts: 177
Hibernate Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course, but I thought that it might be possible to map this value to an int in the right entity.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic