|Re: [CDO] Can different idGenerationLocations be used on a same server ? [message #1242244 is a reply to message #1231714]
||Sun, 09 February 2014 07:58
| Eike Stepper
Registered: July 2009
Am 15.01.2014 09:41, schrieb Stéphane Thibaudeau:|
> To achieve the same result, would it be possible to customize the ID generator on the server side so it can generate
> ID based on the traceability informations for migrated elements and fall back to a default generated ID for new elements ?
On the server side the ID generation (handling, more generally) has a lot more responsibilities and is always
IStore-specific. The DBStore uses an instance of org.eclipse.emf.cdo.server.db.IIDHandler, typically LongIDHandler to
deal with IDs, meta IDs, external IDs and their column types in the database.
I've not heard of anybody trying it out but in theory you can play with it by changing how
org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate() initializes the ID handler. Currently this is done:
if (idGenerationLocation == IDGenerationLocation.CLIENT)
idHandler = new UUIDHandler(this);
idHandler = new LongIDHandler(this);
If your scenario is reasonable and you can make it work in a prototype we can probably introduce an IDHandlerFactory so
that you don't have to fork the whole DBStore.
Powered by FUDForum
. Page generated in 0.10965 seconds