aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate bidirectional manyToOne: How to get Index easily. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate bidirectional manyToOne: How to get Index easily." Watch "Hibernate bidirectional manyToOne: How to get Index easily." New topic
Author

Hibernate bidirectional manyToOne: How to get Index easily.

Manuel Petermann
Ranch Hand

Joined: Jul 19, 2011
Posts: 175

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.


Please correct my English.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

If you frequently need this then it might better to have a method for just that?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Manuel Petermann
Ranch Hand

Joined: Jul 19, 2011
Posts: 175

Of course, but I thought that it might be possible to map this value to an int in the right entity.
 
Consider Paul's rocket mass heater.
 
subject: Hibernate bidirectional manyToOne: How to get Index easily.