Hi
I'm writing a web service which will return the result of a hibernate query, for example a list of Users.
I've used Hibernate Tools to create the classes and mapping files from the existing database.
The problem I have is that Hibernate Tools generates these one-to-many relationships. Normally this is no problem because it is lazy loaded, but when delivering this as the result of a web service all the one-to-many relationships will have to be loaded and transmitted to the client.
This leads to that nearly the entire database will be sent to the client.
Is there a way to tell hibernate tools not to generate one-to-many relations?
Thanks
- Markus
|