Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » teneo: client/server scenario
teneo: client/server scenario [message #127346] Mon, 21 July 2008 08:00 Go to next message
Eclipse UserFriend
Originally posted by: hodi_.gmx.at

Hi,

I'm using teneo in a client/server scenario.
I found hints on the elver.org site to explicitly model id and version
attributes and this works pretty well. Anyway, there's one issue which
is still troubling me: The version field of clients and database is
getting out of sync in my application. Hibernate is incrementing the
version each time it does an update on the object (or better, it does
that on every update on the row in the database table). My clients do
not get notified about this and they keep an old version value, so
a further update on the same object would not work.

As I'm working with large emf models I do not want to read out objects
and compare version values before updating.

So my question are:
- Would a client/server scenario using teneo work without using the
version attribute at all (my attempt would be setting
PersistenceOptions.ALWAYS_VERSION to false and leave emf without any
explicitely modelled version attributes)?
- Is there a way to teach teneo/hibernate to do not care about the
version values and just do an update on the objects if the id is matching?

I'm using teneo 1.0.0, emf 2.4 and hibernate 3.2.1.

Regards,
Dietmar
Re: teneo: client/server scenario [message #127359 is a reply to message #127346] Mon, 21 July 2008 09:29 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Dietmar,
Yes setting the persistenceOptions.always_version to false should get rid of the version attribute.
This should result in that the record is always updated.
With a version attribute it is not possible to prevent this exception.

Note that the cdo project provides a way for notifying distributed clients when the state on the
server/database changes.

btw, I cross-posted to the emf newsgroup because support for Teneo is given there since the 1.0.0
release.

gr. Martin

Dietmar Holzer wrote:
> Hi,
>
> I'm using teneo in a client/server scenario.
> I found hints on the elver.org site to explicitly model id and version
> attributes and this works pretty well. Anyway, there's one issue which
> is still troubling me: The version field of clients and database is
> getting out of sync in my application. Hibernate is incrementing the
> version each time it does an update on the object (or better, it does
> that on every update on the row in the database table). My clients do
> not get notified about this and they keep an old version value, so
> a further update on the same object would not work.
>
> As I'm working with large emf models I do not want to read out objects
> and compare version values before updating.
>
> So my question are:
> - Would a client/server scenario using teneo work without using the
> version attribute at all (my attempt would be setting
> PersistenceOptions.ALWAYS_VERSION to false and leave emf without any
> explicitely modelled version attributes)?
> - Is there a way to teach teneo/hibernate to do not care about the
> version values and just do an update on the objects if the id is matching?
>
> I'm using teneo 1.0.0, emf 2.4 and hibernate 3.2.1.
>
> Regards,
> Dietmar


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
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: teneo: client/server scenario [message #620133 is a reply to message #127346] Mon, 21 July 2008 09:29 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Dietmar,
Yes setting the persistenceOptions.always_version to false should get rid of the version attribute.
This should result in that the record is always updated.
With a version attribute it is not possible to prevent this exception.

Note that the cdo project provides a way for notifying distributed clients when the state on the
server/database changes.

btw, I cross-posted to the emf newsgroup because support for Teneo is given there since the 1.0.0
release.

gr. Martin

Dietmar Holzer wrote:
> Hi,
>
> I'm using teneo in a client/server scenario.
> I found hints on the elver.org site to explicitly model id and version
> attributes and this works pretty well. Anyway, there's one issue which
> is still troubling me: The version field of clients and database is
> getting out of sync in my application. Hibernate is incrementing the
> version each time it does an update on the object (or better, it does
> that on every update on the row in the database table). My clients do
> not get notified about this and they keep an old version value, so
> a further update on the same object would not work.
>
> As I'm working with large emf models I do not want to read out objects
> and compare version values before updating.
>
> So my question are:
> - Would a client/server scenario using teneo work without using the
> version attribute at all (my attempt would be setting
> PersistenceOptions.ALWAYS_VERSION to false and leave emf without any
> explicitely modelled version attributes)?
> - Is there a way to teach teneo/hibernate to do not care about the
> version values and just do an update on the objects if the id is matching?
>
> I'm using teneo 1.0.0, emf 2.4 and hibernate 3.2.1.
>
> Regards,
> Dietmar


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
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
Previous Topic:teneo: client/server scenario
Next Topic:JPA Temporal annotation doesn't work for EReference features
Goto Forum:
  


Current Time: Thu Apr 18 23:44:39 GMT 2024

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

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

Back to the top