Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Second Id in database
Second Id in database [message #1269113] Tue, 11 March 2014 11:56 Go to next message
Areq Novak is currently offline Areq NovakFriend
Messages: 12
Registered: March 2014
Junior Member
My table looks like:

cdo_id ... name, desc ...

cdo_id is automatically generated through server (during persistence)

I want to have second column in db (for example: uid), this field should be generated automatically by server during persistence (similar like cdo_id)

Exist any possibility to reach such functionality ?
Re: Second Id in database [message #1269199 is a reply to message #1269113] Tue, 11 March 2014 14:06 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 11.03.2014 12:56, schrieb Areq Novak:
> My table looks like:
>
> cdo_id ... name, desc ...
>
> cdo_id is automatically generated through server (during persistence)
>
> I want to have second column in db (for example: uid), this field should be generated automatically by server during
> persistence (similar like cdo_id)
>
> Exist any possibility to reach such functionality ?
There is no support for additional ID columns/attributes. But you can configure the server (before first start!) to let
the clients generate UUIDs instead of the deault server-generated long IDs:

In your cdo-server.xml set:

<property name="idGenerationLocation" value="CLIENT"/> <!-- Possible values: STORE | CLIENT -->

Then cdoID() will return a client-assigned UUID, which will also be stored in the cdo_id columns in the DB.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:CDOQuery to CDOObject - access to cdo_id
Next Topic:CDO custom id as CDOid
Goto Forum:
  


Current Time: Fri Apr 26 17:34:06 GMT 2024

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

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

Back to the top