Re: [Hibernate] Diffferent version strategies

2004-04-22 Thread Jenica Humphreys
Apparently, we have been exploiting the bug where changes to inverse relationships do affect the modified version timestamp. I think it would be useful to indicate whether you want changes to the relationship to update the owner's timestamp independently of whether the relationship is inverse

Re: [Hibernate] Diffferent version strategies

2004-04-22 Thread Christian Bauer
On 23 Apr (04:10), Gavin King wrote: > I have confirmed this. It is not intended behavior. > > PersistentCollectionType.isDirty() > DirtyCollectionSearchVisitor > > should both check that the collection is not inverse="true" before > returning true. > > Add it to TODO list. I still think th

Re: [Hibernate] Diffferent version strategies

2004-04-22 Thread Gavin King
I have confirmed this. It is not intended behavior. PersistentCollectionType.isDirty() DirtyCollectionSearchVisitor should both check that the collection is not inverse="true" before returning true. Add it to TODO list. Christian Bauer wrote: On 22 Apr (22:24), Gavin King wrote: Not true

Re: [Hibernate] Diffferent version strategies

2004-04-22 Thread Christian Bauer
On 22 Apr (22:24), Gavin King wrote: > Not true. If the collection is inverse="true", manipulating the > collection does /not/ update the > owner's version number! I just tried A -one-to-many- B (bidi), inverse collection on A. Adding a B to the collection, saving the A, I got an incremented ver

Re: [Hibernate] Diffferent version strategies

2004-04-22 Thread Christian Bauer
On 22 Apr (14:16), Emmanuel Bernard wrote: > This is especially true when reattaching objects. sometimes, reattaching > it will update the version number wo any "real" modification. What is "sometimes"? :) -- Christian Bauer [EMAIL PROTECTED] http://www.hibernate.org/ --

Re: [Hibernate] Diffferent version strategies

2004-04-22 Thread Emmanuel Bernard
What I meant is : I do session.update(myobject); Hibernate will always increase the version number. But myobject properties may not have been updated for real (business speaking), so no need to update the business version number. Christian Bauer wrote: On 22 Apr (14:16), Emmanuel Bernard wrote:

Re: [Hibernate] Diffferent version strategies

2004-04-22 Thread Gavin King
Christian Bauer wrote: Right now, Hibernate will increment an entity version number whenever a property of the entity is modified and the entity is being saved. This is true for modifications of simple properties, components, many-to-one relationships and even collections of value types and collec

Re: [Hibernate] Diffferent version strategies

2004-04-22 Thread Emmanuel Bernard
Just some thoughts I had on this subject. Looks wrong to me to use the versioning of Hibernate to manage an application versioning. I always split the 2 concepts and thus the 2 implementations. This is especially true when reattaching objects. sometimes, reattaching it will update the version nu

[Hibernate] Diffferent version strategies

2004-04-21 Thread Christian Bauer
Right now, Hibernate will increment an entity version number whenever a property of the entity is modified and the entity is being saved. This is true for modifications of simple properties, components, many-to-one relationships and even collections of value types and collections for one-to-many an