Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [CDO] Allowing (or ignoring) duplicate objects for certain types
[CDO] Allowing (or ignoring) duplicate objects for certain types [message #906377] Sat, 01 September 2012 09:25 Go to next message
Shahim Essaid is currently offline Shahim Essaid
Messages: 40
Registered: July 2009
Member
Hi all,

Is it possible to extend or modify the CDO client and server API to allow for new objects with the same CDOID as one already in the repository? I have few immutable object types that represent statements (logical axioms) and the CDOID is a SHA1 digest of the statement type and the named entities in the statement. I want to allow for adding new statements by clients even if the same statement is already in the repository. In other words, there is only one copy of an instance of a specific statement (because same statements will have the same SHA1) and any object that refers to an identical statement should refer to the one already in the repository. Is this possible?

Thanks
Shahim
Re: [CDO] Allowing (or ignoring) duplicate objects for certain types [message #906415 is a reply to message #906377] Sat, 01 September 2012 11:40 Go to previous message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Hi Shahim,

Please ask CDO questions on the EMF forum.

Comments below...


Am 01.09.2012 11:25, schrieb Shahim Essaid:
> Hi all,
>
> Is it possible to extend or modify the CDO client and server API to allow for new objects with the same CDOID as one
> already in the repository?
No, that's bad.

> I have few immutable object types that represent statements (logical axioms) and the CDOID is a SHA1 digest of the
> statement type and the named entities in the statement. I want to allow for adding new statements by clients even if
> the same statement is already in the repository.
That's a problem you must solve on the layer where you add these things. You can reuse objects by looking them up by
their SHA1 but you must not simply re-add them and hope that CDO recognizes their identical content.

> In other words, there is only one copy of an instance of a specific statement (because same statements will have the
> same SHA1) and any object that refers to an identical statement should refer to the one already in the repository. Is
> this possible?
No.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:Texo And Teneo
Next Topic:[Texo] make _eclass optional when using query in PUT
Goto Forum:
  


Current Time: Sat Oct 25 10:13:09 GMT 2014

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

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