-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: read-only one-to-many
PostPosted: Thu Jun 03, 2004 6:19 am 
Regular
Regular

Joined: Thu Sep 04, 2003 10:43 am
Posts: 61
I have a complex situation of master-details, in which I'd like to have the full control of the saving process of both.
For this reason I did not mapped any "one-to-many" relation in the master ... and my save works fine.
For reading the records it whould be nice to use a one-to-many mapping ... so I wrote it in the master ... and reading works fine, but after I have problems in saving (which I won't explain here).
Why is not possible to have a mapping one-to-many only for reading? Why there is no choice to write insert=false, update=false just like in the -many-to-one mapping?
Or ... is this possible and I did not see how?
Regards
Alessandro Rizzi


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 03, 2004 2:36 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
inverse="true" will not manage the association from this side.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 04, 2004 4:56 am 
Regular
Regular

Joined: Thu Sep 04, 2003 10:43 am
Posts: 61
emmanuel wrote:
inverse="true" will not manage the association from this side.

What do you mean?
I did not used inverse="true" ...
Can you kindly explain me better?
Regards


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 04, 2004 5:05 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Just put an inverse="true" on the one-to-many set/bag and it will never get saved or updated. And search on the website and the documentation if you want to know what it means.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 04, 2004 5:29 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
http://www.hibernate.org/155.html

http://www.hibernate.org/hib_docs/refer ... child.html

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 08, 2004 12:16 pm 
Regular
Regular

Joined: Thu Sep 04, 2003 10:43 am
Posts: 61
christian wrote:
Just put an inverse="true" on the one-to-many set/bag and it will never get saved or updated. And search on the website and the documentation if you want to know what it means.


Thanks a lot, this was exaclty what I was looking for.
Alessandro


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.