Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » new objects and IObjectID
new objects and IObjectID [message #2881] Tue, 20 May 2008 20:18 Go to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

the next question ;-)

I read that each object must have a unique IObjectID
and the client has to create a temp IObjectID for new objects.

am I right that these temp IObjectID have to be unique inside one OT
and that the client is responsible for this ?

and I have to use ObjectTransaction.setObjectIdUpdate()
first time at server after getting the new ID from Hibernate
second time at client after import server-delta, commitToObjects
(and of course to all @EMBEDDED objects)

thx

ekke
Re: new objects and IObjectID [message #3005 is a reply to message #2881] Mon, 26 May 2008 11:11 Go to previous messageGo to next message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
nearly right
- you have to create temp unique ids on the client
- you have to call setObjectIdUpdate() when you set the real object id on the server
- however that becomes part of the OT and therefore gets into the delta
- so once you stored the data on the server, the objectid is modified
- you extract a delta and apply that on the client
- that will also make the objectids change on the client (automagically)
- same with setVersionUpdate (set on the server, gets automagially updated on the client with the next delta)

christian

ekke schrieb:
> the next question ;-)
>
> I read that each object must have a unique IObjectID
> and the client has to create a temp IObjectID for new objects.
>
> am I right that these temp IObjectID have to be unique inside one OT
> and that the client is responsible for this ?
>
> and I have to use ObjectTransaction.setObjectIdUpdate()
> first time at server after getting the new ID from Hibernate
> second time at client after import server-delta, commitToObjects
> (and of course to all @EMBEDDED objects)
>
> thx
>
> ekke
>
Re: new objects and IObjectID [message #3052 is a reply to message #3005] Mon, 26 May 2008 17:56 Go to previous message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

the @ID field will be set from Hibernate (Database)
at the moment there's no setter
so I also have to add a private setter - so the client will be able
to set the ID from OT after getting server - delta

thx for info

ekke

Christian Campo wrote:

> nearly right
> - you have to create temp unique ids on the client
> - you have to call setObjectIdUpdate() when you set the real object id on
the server
> - however that becomes part of the OT and therefore gets into the delta
> - so once you stored the data on the server, the objectid is modified
> - you extract a delta and apply that on the client
> - that will also make the objectids change on the client (automagically)
> - same with setVersionUpdate (set on the server, gets automagially updated
on the client with the next delta)

> christian

> ekke schrieb:
>> the next question ;-)
>>
>> I read that each object must have a unique IObjectID
>> and the client has to create a temp IObjectID for new objects.
>>
>> am I right that these temp IObjectID have to be unique inside one OT
>> and that the client is responsible for this ?
>>
>> and I have to use ObjectTransaction.setObjectIdUpdate()
>> first time at server after getting the new ID from Hibernate
>> second time at client after import server-delta, commitToObjects
>> (and of course to all @EMBEDDED objects)
>>
>> thx
>>
>> ekke
>>
Re: new objects and IObjectID [message #571506 is a reply to message #2881] Mon, 26 May 2008 11:11 Go to previous message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
nearly right
- you have to create temp unique ids on the client
- you have to call setObjectIdUpdate() when you set the real object id on the server
- however that becomes part of the OT and therefore gets into the delta
- so once you stored the data on the server, the objectid is modified
- you extract a delta and apply that on the client
- that will also make the objectids change on the client (automagically)
- same with setVersionUpdate (set on the server, gets automagially updated on the client with the next delta)

christian

ekke schrieb:
> the next question ;-)
>
> I read that each object must have a unique IObjectID
> and the client has to create a temp IObjectID for new objects.
>
> am I right that these temp IObjectID have to be unique inside one OT
> and that the client is responsible for this ?
>
> and I have to use ObjectTransaction.setObjectIdUpdate()
> first time at server after getting the new ID from Hibernate
> second time at client after import server-delta, commitToObjects
> (and of course to all @EMBEDDED objects)
>
> thx
>
> ekke
>
Re: new objects and IObjectID [message #571616 is a reply to message #3005] Mon, 26 May 2008 17:56 Go to previous message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

the @ID field will be set from Hibernate (Database)
at the moment there's no setter
so I also have to add a private setter - so the client will be able
to set the ID from OT after getting server - delta

thx for info

ekke

Christian Campo wrote:

> nearly right
> - you have to create temp unique ids on the client
> - you have to call setObjectIdUpdate() when you set the real object id on
the server
> - however that becomes part of the OT and therefore gets into the delta
> - so once you stored the data on the server, the objectid is modified
> - you extract a delta and apply that on the client
> - that will also make the objectids change on the client (automagically)
> - same with setVersionUpdate (set on the server, gets automagially updated
on the client with the next delta)

> christian

> ekke schrieb:
>> the next question ;-)
>>
>> I read that each object must have a unique IObjectID
>> and the client has to create a temp IObjectID for new objects.
>>
>> am I right that these temp IObjectID have to be unique inside one OT
>> and that the client is responsible for this ?
>>
>> and I have to use ObjectTransaction.setObjectIdUpdate()
>> first time at server after getting the new ID from Hibernate
>> second time at client after import server-delta, commitToObjects
>> (and of course to all @EMBEDDED objects)
>>
>> thx
>>
>> ekke
>>
Previous Topic:Embedded Objects - Value Objects
Next Topic:riena server outside eclipse
Goto Forum:
  


Current Time: Fri Sep 20 16:35:02 GMT 2024

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

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

Back to the top