new objects and IObjectID [message #2881] |
Tue, 20 May 2008 16:18  |
Eclipse User |
|
|
|
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 #3052 is a reply to message #3005] |
Mon, 26 May 2008 13:56  |
Eclipse User |
|
|
|
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 07:11  |
Eclipse User |
|
|
|
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 13:56  |
Eclipse User |
|
|
|
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
>>
|
|
|
Powered by
FUDForum. Page generated in 0.07319 seconds