-->
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.  [ 2 posts ] 
Author Message
 Post subject: update a component
PostPosted: Tue Sep 23, 2003 7:25 am 
Newbie

Joined: Fri Sep 12, 2003 4:58 am
Posts: 7
Hello,

Is it possible to save/update a component after loading it by session.find()? We're not selecting the object as a whole, only the component...

If it is, then we must have a mapping file for the component class, right?

I have tried to save a component with the following mapping file and nothing happened:

<class name="Abc" table="tbl_Abc">

<id name="surname" column="surname" type="java.lang.String">
<generator class="assigned">
</generator>
</id>
</class>

There is only one field in the component...


Regards.

Serkan Soykan


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 23, 2003 8:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
The term "component" has a very special meaning in Hibernate. It is completely distinct from a mapped "entity". Components cannot be persisted outside of the reference to the entity which contains them. If you make this a many-to-one relation to another entity, however you can do this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.