|Re: [sdo serialization] want to use reference instead of id [message #431200 is a reply to message #431198]
||Thu, 02 July 2009 10:52
| Ed Merks
Registered: July 2009
Thomas Franconville wrote:
> Hi all,
> I have problem with sdo serialization.
> We are using teneo for loading our data, so ids are generated by
> database. Depending on database type, id for different EObject are
> generated differently as it can be unique for all object or inside a
> type of object.
Well, that's not how IDs are defined in XML Schema or Ecore though.
They must be unique with a resource/document across all types.
> In the second case (which is the case with sql server database), I
> have problem with sdo serialization.
> Here is a sample of serialization
> <sdo:datagraph xmlns:com.oslo.dreams="http:///com.oslo.dreams.model"
> <resources name="toto" resourceCategories="#1"
> <capabilities name="capa1" skill="#1"
> <capabilities name="capa2" skill="#2"
> <resourceCategories id="1" name="haute categorie"/>
> <skills id="1" name="s1"/>
> <skills id="2" name="s2"/>
> As we can see, some references are using ids.
> But for id 1 we have to kind of EObject (Skill and ResourceCategorie)
> So the deserialization will not work.
It's an invalid document so unfortunately it's not going to work.
Resource.getEObject only gets a String argument. It does not know the
type of object it should return.
> We are working with ecore 2.4.2 and teneo 1.1.0.
I'd suggest using a specialized EDataType for each such id EAttribute
and encode the type name, as part of convertAbcToString.
> Thank's all for any clue that can help me to get ahead.
Professional Support: https://www.macromodeling.com/
Powered by FUDForum
. Page generated in 0.01358 seconds