Probably not a JSF or Struts problem per se, but
you might reference the same variables
from the form and set both properties to the same
value and then do a store on one...

Check your binding code, if it really references different objects
and also check the referenced ids of the objects,
it really looks like you point to the same object for one reason or the
other.



Nicolas GENSOLLEN wrote:
> I thought so too before i read a post in forum.hibernate.org.
> A man had the same problem and was saying it wasn't a hibernate but a
> struts problem.
> 
> So, i wondered if the same problem would not exist with JSF ...
> 
> Thank you.
> 
> ----- Original Message ----- From: "Werner Punz" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, September 20, 2005 9:38 AM
> Subject: Re: Fw: JSF - SPRING - HIBERNATE Mapping problem
> 
> 
>> This is a question which I would ask in forum.hibernate.org
>> because it is very Hibernate specific and neither has anything
>> to do with spring or with JSF,
>> could be that both properties reference a dataset with the same key in
>> the database
>> hence both get updated at the same time.
>>
>>
>>
>> Werner
>>
>>
>>
>> Nicolas GENSOLLEN wrote:
>>
>>> Hi everybody, first excuse me for my poor english.
>>>
>>> I use JSF with Spring and Hibernate and I have the following problem :
>>>
>>> i ve a class with two many-to-one relations which have the same bean
>>> associated.
>>>
>>> This works fine, but , my problems is when i m trying to update the
>>> class and the two beans have the same values, since then hibernate
>>> always update both beans with similar values, independently of the
>>> values you set to the first bean, hibernate always update database with
>>> the values of the second one.
>>>
>>> The hibernate mapping look likes that :
>>>
>>> <many-to-one name="name1"  column="columnA" *class*="com.classeA"/>
>>> <many-to-one name="name2" column="columnB" *class*="com.classA"/>
>>>
>>> If someone has the same problem...
>>>
>>> Thank you for your help.
>>>
>>
> 
> 

Reply via email to