Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Version Control System
Version Control System [message #120219] Sat, 26 April 2008 15:07 Go to next message
Yigal Spinner is currently offline Yigal SpinnerFriend
Messages: 127
Registered: July 2009
Senior Member
Hi Martin,
When I generate my Hibernate mapping file, I get the version attribute.
Changing the data in the database creates new version of the objects.

I have some questions about this:
1. Can I use this feature and create a Version Control
application/database (similar to a source control) but for a complete
model? After all there are relation to maintain and it could be of
several levels and I would to be able to version it and retrieve a
certain version that includes the relations at that version.
2. Where can I read more about this?

Thanks
Yigal
Re: Version Control System [message #120259 is a reply to message #120219] Sun, 27 April 2008 20:30 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Yigal,
Afaik the hibernate versioning is really for optimistic locking and nothing more. I think to get
complete versioning (to call it that) you would need to implement/model it explicitly. Hibernate has
some concepts which can be helpfull (interceptors/eventlisteners for example). Maybe this blog can
give some tips:
http://hacimbengali.blogspot.com/2007/05/versionierung-von-d atenbank-entitten.html

gr. Martin

Yigal wrote:
> Hi Martin,
> When I generate my Hibernate mapping file, I get the version attribute.
> Changing the data in the database creates new version of the objects.
>
> I have some questions about this:
> 1. Can I use this feature and create a Version Control
> application/database (similar to a source control) but for a complete
> model? After all there are relation to maintain and it could be of
> several levels and I would to be able to version it and retrieve a
> certain version that includes the relations at that version.
> 2. Where can I read more about this?
>
> Thanks
> Yigal



--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Version Control System [message #120285 is a reply to message #120259] Mon, 28 April 2008 06:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Hi Martin,

As you know CDO supports transparent versioning if the configured store
can do that. Do you think we should give it a try and enhance the
HibernateStore such that transparent versioning is supported out of the box?

Cheers
/Eike


Martin Taal schrieb:
> Hi Yigal,
> Afaik the hibernate versioning is really for optimistic locking and
> nothing more. I think to get complete versioning (to call it that) you
> would need to implement/model it explicitly. Hibernate has some
> concepts which can be helpfull (interceptors/eventlisteners for
> example). Maybe this blog can give some tips:
> http://hacimbengali.blogspot.com/2007/05/versionierung-von-d atenbank-entitten.html
>
>
> gr. Martin
>
> Yigal wrote:
>> Hi Martin,
>> When I generate my Hibernate mapping file, I get the version
>> attribute. Changing the data in the database creates new version of
>> the objects.
>>
>> I have some questions about this:
>> 1. Can I use this feature and create a Version Control
>> application/database (similar to a source control) but for a complete
>> model? After all there are relation to maintain and it could be of
>> several levels and I would to be able to version it and retrieve a
>> certain version that includes the relations at that version.
>> 2. Where can I read more about this?
>>
>> Thanks
>> Yigal
>
>
>
Re: Version Control System [message #120447 is a reply to message #120285] Mon, 28 April 2008 19:57 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Eike,
Yes that's a nice idea. However what I am not sure about is how to handle foreign key relations in
the db using versioning. Afaiu the version number needs to be part of the primary key and foreign
keys. But I can't really imagine how foreign keys can work when the target object is updated and a
new version is stored in the db.

How is this done in cdo?

gr. Martin

Eike Stepper wrote:
> Hi Martin,
>
> As you know CDO supports transparent versioning if the configured store
> can do that. Do you think we should give it a try and enhance the
> HibernateStore such that transparent versioning is supported out of the
> box?
>
> Cheers
> /Eike
>
>
> Martin Taal schrieb:
>> Hi Yigal,
>> Afaik the hibernate versioning is really for optimistic locking and
>> nothing more. I think to get complete versioning (to call it that) you
>> would need to implement/model it explicitly. Hibernate has some
>> concepts which can be helpfull (interceptors/eventlisteners for
>> example). Maybe this blog can give some tips:
>> http://hacimbengali.blogspot.com/2007/05/versionierung-von-d atenbank-entitten.html
>>
>>
>> gr. Martin
>>
>> Yigal wrote:
>>> Hi Martin,
>>> When I generate my Hibernate mapping file, I get the version
>>> attribute. Changing the data in the database creates new version of
>>> the objects.
>>>
>>> I have some questions about this:
>>> 1. Can I use this feature and create a Version Control
>>> application/database (similar to a source control) but for a complete
>>> model? After all there are relation to maintain and it could be of
>>> several levels and I would to be able to version it and retrieve a
>>> certain version that includes the relations at that version.
>>> 2. Where can I read more about this?
>>>
>>> Thanks
>>> Yigal
>>
>>
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Version Control System [message #120460 is a reply to message #120447] Mon, 28 April 2008 20:13 Go to previous message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Martin Taal schrieb:
> Hi Eike,
> Yes that's a nice idea. However what I am not sure about is how to
> handle foreign key relations in the db using versioning. Afaiu the
> version number needs to be part of the primary key and foreign keys.
> But I can't really imagine how foreign keys can work when the target
> object is updated and a new version is stored in the db.
>
> How is this done in cdo?
In CDO the foreign keys are not versioned. In general entities are not
looked up via version but via timestamp to get a consistent view across
all entities. This is called an audit view. A normal view that sees the
latest versions (like a floating label) is also available. It will be
necessary to add two timestamp columns (created and revised).

Do you think that would be feasible with Hibernate?

Cheers
/Eike


>
> gr. Martin
>
> Eike Stepper wrote:
>> Hi Martin,
>>
>> As you know CDO supports transparent versioning if the configured
>> store can do that. Do you think we should give it a try and enhance
>> the HibernateStore such that transparent versioning is supported out
>> of the box?
>>
>> Cheers
>> /Eike
>>
>>
>> Martin Taal schrieb:
>>> Hi Yigal,
>>> Afaik the hibernate versioning is really for optimistic locking and
>>> nothing more. I think to get complete versioning (to call it that)
>>> you would need to implement/model it explicitly. Hibernate has some
>>> concepts which can be helpfull (interceptors/eventlisteners for
>>> example). Maybe this blog can give some tips:
>>> http://hacimbengali.blogspot.com/2007/05/versionierung-von-d atenbank-entitten.html
>>>
>>>
>>> gr. Martin
>>>
>>> Yigal wrote:
>>>> Hi Martin,
>>>> When I generate my Hibernate mapping file, I get the version
>>>> attribute. Changing the data in the database creates new version
>>>> of the objects.
>>>>
>>>> I have some questions about this:
>>>> 1. Can I use this feature and create a Version Control
>>>> application/database (similar to a source control) but for a
>>>> complete model? After all there are relation to maintain and it
>>>> could be of several levels and I would to be able to version it and
>>>> retrieve a certain version that includes the relations at that
>>>> version.
>>>> 2. Where can I read more about this?
>>>>
>>>> Thanks
>>>> Yigal
>>>
>>>
>>>
>
>
Re: Version Control System [message #617926 is a reply to message #120219] Sun, 27 April 2008 20:30 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Yigal,
Afaik the hibernate versioning is really for optimistic locking and nothing more. I think to get
complete versioning (to call it that) you would need to implement/model it explicitly. Hibernate has
some concepts which can be helpfull (interceptors/eventlisteners for example). Maybe this blog can
give some tips:
http://hacimbengali.blogspot.com/2007/05/versionierung-von-d atenbank-entitten.html

gr. Martin

Yigal wrote:
> Hi Martin,
> When I generate my Hibernate mapping file, I get the version attribute.
> Changing the data in the database creates new version of the objects.
>
> I have some questions about this:
> 1. Can I use this feature and create a Version Control
> application/database (similar to a source control) but for a complete
> model? After all there are relation to maintain and it could be of
> several levels and I would to be able to version it and retrieve a
> certain version that includes the relations at that version.
> 2. Where can I read more about this?
>
> Thanks
> Yigal



--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Version Control System [message #617928 is a reply to message #120259] Mon, 28 April 2008 06:30 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Martin,

As you know CDO supports transparent versioning if the configured store
can do that. Do you think we should give it a try and enhance the
HibernateStore such that transparent versioning is supported out of the box?

Cheers
/Eike


Martin Taal schrieb:
> Hi Yigal,
> Afaik the hibernate versioning is really for optimistic locking and
> nothing more. I think to get complete versioning (to call it that) you
> would need to implement/model it explicitly. Hibernate has some
> concepts which can be helpfull (interceptors/eventlisteners for
> example). Maybe this blog can give some tips:
> http://hacimbengali.blogspot.com/2007/05/versionierung-von-d atenbank-entitten.html
>
>
> gr. Martin
>
> Yigal wrote:
>> Hi Martin,
>> When I generate my Hibernate mapping file, I get the version
>> attribute. Changing the data in the database creates new version of
>> the objects.
>>
>> I have some questions about this:
>> 1. Can I use this feature and create a Version Control
>> application/database (similar to a source control) but for a complete
>> model? After all there are relation to maintain and it could be of
>> several levels and I would to be able to version it and retrieve a
>> certain version that includes the relations at that version.
>> 2. Where can I read more about this?
>>
>> Thanks
>> Yigal
>
>
>


Re: Version Control System [message #617940 is a reply to message #120285] Mon, 28 April 2008 19:57 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Eike,
Yes that's a nice idea. However what I am not sure about is how to handle foreign key relations in
the db using versioning. Afaiu the version number needs to be part of the primary key and foreign
keys. But I can't really imagine how foreign keys can work when the target object is updated and a
new version is stored in the db.

How is this done in cdo?

gr. Martin

Eike Stepper wrote:
> Hi Martin,
>
> As you know CDO supports transparent versioning if the configured store
> can do that. Do you think we should give it a try and enhance the
> HibernateStore such that transparent versioning is supported out of the
> box?
>
> Cheers
> /Eike
>
>
> Martin Taal schrieb:
>> Hi Yigal,
>> Afaik the hibernate versioning is really for optimistic locking and
>> nothing more. I think to get complete versioning (to call it that) you
>> would need to implement/model it explicitly. Hibernate has some
>> concepts which can be helpfull (interceptors/eventlisteners for
>> example). Maybe this blog can give some tips:
>> http://hacimbengali.blogspot.com/2007/05/versionierung-von-d atenbank-entitten.html
>>
>>
>> gr. Martin
>>
>> Yigal wrote:
>>> Hi Martin,
>>> When I generate my Hibernate mapping file, I get the version
>>> attribute. Changing the data in the database creates new version of
>>> the objects.
>>>
>>> I have some questions about this:
>>> 1. Can I use this feature and create a Version Control
>>> application/database (similar to a source control) but for a complete
>>> model? After all there are relation to maintain and it could be of
>>> several levels and I would to be able to version it and retrieve a
>>> certain version that includes the relations at that version.
>>> 2. Where can I read more about this?
>>>
>>> Thanks
>>> Yigal
>>
>>
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Version Control System [message #617941 is a reply to message #120447] Mon, 28 April 2008 20:13 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Martin Taal schrieb:
> Hi Eike,
> Yes that's a nice idea. However what I am not sure about is how to
> handle foreign key relations in the db using versioning. Afaiu the
> version number needs to be part of the primary key and foreign keys.
> But I can't really imagine how foreign keys can work when the target
> object is updated and a new version is stored in the db.
>
> How is this done in cdo?
In CDO the foreign keys are not versioned. In general entities are not
looked up via version but via timestamp to get a consistent view across
all entities. This is called an audit view. A normal view that sees the
latest versions (like a floating label) is also available. It will be
necessary to add two timestamp columns (created and revised).

Do you think that would be feasible with Hibernate?

Cheers
/Eike


>
> gr. Martin
>
> Eike Stepper wrote:
>> Hi Martin,
>>
>> As you know CDO supports transparent versioning if the configured
>> store can do that. Do you think we should give it a try and enhance
>> the HibernateStore such that transparent versioning is supported out
>> of the box?
>>
>> Cheers
>> /Eike
>>
>>
>> Martin Taal schrieb:
>>> Hi Yigal,
>>> Afaik the hibernate versioning is really for optimistic locking and
>>> nothing more. I think to get complete versioning (to call it that)
>>> you would need to implement/model it explicitly. Hibernate has some
>>> concepts which can be helpfull (interceptors/eventlisteners for
>>> example). Maybe this blog can give some tips:
>>> http://hacimbengali.blogspot.com/2007/05/versionierung-von-d atenbank-entitten.html
>>>
>>>
>>> gr. Martin
>>>
>>> Yigal wrote:
>>>> Hi Martin,
>>>> When I generate my Hibernate mapping file, I get the version
>>>> attribute. Changing the data in the database creates new version
>>>> of the objects.
>>>>
>>>> I have some questions about this:
>>>> 1. Can I use this feature and create a Version Control
>>>> application/database (similar to a source control) but for a
>>>> complete model? After all there are relation to maintain and it
>>>> could be of several levels and I would to be able to version it and
>>>> retrieve a certain version that includes the relations at that
>>>> version.
>>>> 2. Where can I read more about this?
>>>>
>>>> Thanks
>>>> Yigal
>>>
>>>
>>>
>
>


Previous Topic:[EMF Compare] Name similarity/Label provider
Next Topic:[Teneo][CDO-Hibernate] How to access the EMF type of a CDOFeature server-side (CUSTOM data type prob
Goto Forum:
  


Current Time: Thu Apr 25 01:40:05 GMT 2024

Powered by FUDForum. Page generated in 0.04042 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top