Home » Modeling » EMF » [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore
|
Re: [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore [message #509778 is a reply to message #509760] |
Mon, 25 January 2010 11:28 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Bjoern,
Yes this works very different than in Teneo. With CDO the types on the client (incl. user types) are not know on the
server. Afaiu CDO can not persist arbitrary user types as it needs to know how to (de-)serialize the objects when
sending them over from the client to the server and back.
Eike or others, how would this be handled? Is there a way that you can specify how an object value (not a native java
lang) should be send to the server?
Depending on how CDO sends the object to the server and represents it there, I can generate the correct mapping for
these non-mapped types.
Btw, I am not sure if this is a blocking issue for you, but you can annotate the efeature as transient then it won't be
persisted for now, so you are not stuck.
gr. Martin
Bjoern Sundin wrote:
> After converting my application from Teneo/Hibernate to CDO (3.0) using a
> Teneo Hibernate Datastore I have a problem with an EJavaObject not being
> mapped anymore. Basically is it a java object that I would like to store
> binary into the database. With teneo 1.0.1 it worked (using derby or mysql).
> Attached is a text file with the hbm mapping and stack traces (log.txt).
>
>
>
> Details:
>
> Line 2728:
>
> <property name="value" lazy="false" insert="true" update="true"
> not-null="false" unique="false">
>
> <column not-null="false" unique="false" name="`value`" length="1024"/>
>
> <type
> name=" org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype ">
>
> <param name="edatatype">EJavaObject</param>
>
> <param
> name="epackage">http://www.eclipse.org/emf/2002/Ecore</param>
>
> </type>
>
> </property>
>
>
>
> Exception:
>
> Could not determine type for:
>
> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>
> table: steptelegramcontent, for columns:
>
> [org.hibernate.mapping.Column(value)]
>
> org.hibernate.MappingException: Could not determine type for:
>
> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>
> table: steptelegramcontent, for columns:
>
> [org.hibernate.mapping.Column(value)]
>
>
>
> Any help is appreciated!
>
>
>
> Cheers
>
> Björn
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore [message #509785 is a reply to message #509778] |
Mon, 25 January 2010 07:28 |
|
Hey Guys,
So far we've not been giving much thought on binary EDataTypes like java
objects or even streams. Currently all EDataTypes except the most
primitive ones and their wrappers have a special handling to make them
serialize efficiently. All other types and especially custom EDataTypes
(as opposed to the ones in Ecore) are (de-) serialized as Strings.
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Martin Taal schrieb:
> Hi Bjoern,
> Yes this works very different than in Teneo. With CDO the types on the
> client (incl. user types) are not know on the server. Afaiu CDO can
> not persist arbitrary user types as it needs to know how to
> (de-)serialize the objects when sending them over from the client to
> the server and back.
>
> Eike or others, how would this be handled? Is there a way that you can
> specify how an object value (not a native java lang) should be send to
> the server?
>
> Depending on how CDO sends the object to the server and represents it
> there, I can generate the correct mapping for these non-mapped types.
>
> Btw, I am not sure if this is a blocking issue for you, but you can
> annotate the efeature as transient then it won't be persisted for now,
> so you are not stuck.
>
> gr. Martin
>
> Bjoern Sundin wrote:
>> After converting my application from Teneo/Hibernate to CDO (3.0)
>> using a Teneo Hibernate Datastore I have a problem with an
>> EJavaObject not being mapped anymore. Basically is it a java object
>> that I would like to store binary into the database. With teneo 1.0.1
>> it worked (using derby or mysql). Attached is a text file with the
>> hbm mapping and stack traces (log.txt).
>>
>>
>>
>> Details:
>>
>> Line 2728:
>>
>> <property name="value" lazy="false" insert="true" update="true"
>> not-null="false" unique="false">
>>
>> <column not-null="false" unique="false" name="`value`"
>> length="1024"/>
>>
>> <type
>> name=" org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype ">
>>
>> <param name="edatatype">EJavaObject</param>
>>
>> <param
>> name="epackage">http://www.eclipse.org/emf/2002/Ecore</param>
>>
>> </type>
>>
>> </property>
>>
>>
>>
>> Exception:
>>
>> Could not determine type for:
>>
>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>
>> table: steptelegramcontent, for columns:
>>
>> [org.hibernate.mapping.Column(value)]
>>
>> org.hibernate.MappingException: Could not determine type for:
>>
>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>
>> table: steptelegramcontent, for columns:
>>
>> [org.hibernate.mapping.Column(value)]
>>
>>
>>
>> Any help is appreciated!
>>
>>
>>
>> Cheers
>>
>> Björn
>>
>>
>
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore [message #509794 is a reply to message #509785] |
Mon, 25 January 2010 12:50 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Eike,
Okay clear.
Is there a test case in the current test suite which shows this, use an unknown edatatype, case?
I need to make a small change in the mapping logic to handle this. For everyones info, here is the bugzilla covering it:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=300659
gr. Martin
Eike Stepper wrote:
> Hey Guys,
>
> So far we've not been giving much thought on binary EDataTypes like java
> objects or even streams. Currently all EDataTypes except the most
> primitive ones and their wrappers have a special handling to make them
> serialize efficiently. All other types and especially custom EDataTypes
> (as opposed to the ones in Ecore) are (de-) serialized as Strings.
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Martin Taal schrieb:
>> Hi Bjoern,
>> Yes this works very different than in Teneo. With CDO the types on the
>> client (incl. user types) are not know on the server. Afaiu CDO can
>> not persist arbitrary user types as it needs to know how to
>> (de-)serialize the objects when sending them over from the client to
>> the server and back.
>>
>> Eike or others, how would this be handled? Is there a way that you can
>> specify how an object value (not a native java lang) should be send to
>> the server?
>>
>> Depending on how CDO sends the object to the server and represents it
>> there, I can generate the correct mapping for these non-mapped types.
>>
>> Btw, I am not sure if this is a blocking issue for you, but you can
>> annotate the efeature as transient then it won't be persisted for now,
>> so you are not stuck.
>>
>> gr. Martin
>>
>> Bjoern Sundin wrote:
>>> After converting my application from Teneo/Hibernate to CDO (3.0)
>>> using a Teneo Hibernate Datastore I have a problem with an
>>> EJavaObject not being mapped anymore. Basically is it a java object
>>> that I would like to store binary into the database. With teneo 1.0.1
>>> it worked (using derby or mysql). Attached is a text file with the
>>> hbm mapping and stack traces (log.txt).
>>>
>>>
>>>
>>> Details:
>>>
>>> Line 2728:
>>>
>>> <property name="value" lazy="false" insert="true" update="true"
>>> not-null="false" unique="false">
>>>
>>> <column not-null="false" unique="false" name="`value`"
>>> length="1024"/>
>>>
>>> <type
>>> name=" org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype ">
>>>
>>> <param name="edatatype">EJavaObject</param>
>>>
>>> <param
>>> name="epackage">http://www.eclipse.org/emf/2002/Ecore</param>
>>>
>>> </type>
>>>
>>> </property>
>>>
>>>
>>>
>>> Exception:
>>>
>>> Could not determine type for:
>>>
>>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>>
>>> table: steptelegramcontent, for columns:
>>>
>>> [org.hibernate.mapping.Column(value)]
>>>
>>> org.hibernate.MappingException: Could not determine type for:
>>>
>>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>>
>>> table: steptelegramcontent, for columns:
>>>
>>> [org.hibernate.mapping.Column(value)]
>>>
>>>
>>>
>>> Any help is appreciated!
>>>
>>>
>>>
>>> Cheers
>>>
>>> Björn
>>>
>>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore [message #509801 is a reply to message #509794] |
Mon, 25 January 2010 12:55 |
|
Martin Taal schrieb:
> Hi Eike,
> Okay clear.
>
> Is there a test case in the current test suite which shows this, use
> an unknown edatatype, case?
Hard to say. But I couldn't find any ecore file with the string:
xsi:type="ecore:EDataType"
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
>
> I need to make a small change in the mapping logic to handle this. For
> everyones info, here is the bugzilla covering it:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=300659
>
> gr. Martin
>
> Eike Stepper wrote:
>> Hey Guys,
>>
>> So far we've not been giving much thought on binary EDataTypes like java
>> objects or even streams. Currently all EDataTypes except the most
>> primitive ones and their wrappers have a special handling to make them
>> serialize efficiently. All other types and especially custom EDataTypes
>> (as opposed to the ones in Ecore) are (de-) serialized as Strings.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>> Martin Taal schrieb:
>>> Hi Bjoern,
>>> Yes this works very different than in Teneo. With CDO the types on the
>>> client (incl. user types) are not know on the server. Afaiu CDO can
>>> not persist arbitrary user types as it needs to know how to
>>> (de-)serialize the objects when sending them over from the client to
>>> the server and back.
>>>
>>> Eike or others, how would this be handled? Is there a way that you can
>>> specify how an object value (not a native java lang) should be send to
>>> the server?
>>>
>>> Depending on how CDO sends the object to the server and represents it
>>> there, I can generate the correct mapping for these non-mapped types.
>>>
>>> Btw, I am not sure if this is a blocking issue for you, but you can
>>> annotate the efeature as transient then it won't be persisted for now,
>>> so you are not stuck.
>>>
>>> gr. Martin
>>>
>>> Bjoern Sundin wrote:
>>>> After converting my application from Teneo/Hibernate to CDO (3.0)
>>>> using a Teneo Hibernate Datastore I have a problem with an
>>>> EJavaObject not being mapped anymore. Basically is it a java object
>>>> that I would like to store binary into the database. With teneo 1.0.1
>>>> it worked (using derby or mysql). Attached is a text file with the
>>>> hbm mapping and stack traces (log.txt).
>>>>
>>>>
>>>>
>>>> Details:
>>>>
>>>> Line 2728:
>>>>
>>>> <property name="value" lazy="false" insert="true" update="true"
>>>> not-null="false" unique="false">
>>>>
>>>> <column not-null="false" unique="false" name="`value`"
>>>> length="1024"/>
>>>>
>>>> <type
>>>> name=" org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype ">
>>>>
>>>>
>>>> <param name="edatatype">EJavaObject</param>
>>>>
>>>> <param
>>>> name="epackage">http://www.eclipse.org/emf/2002/Ecore</param>
>>>>
>>>> </type>
>>>>
>>>> </property>
>>>>
>>>>
>>>>
>>>> Exception:
>>>>
>>>> Could not determine type for:
>>>>
>>>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>>>
>>>> table: steptelegramcontent, for columns:
>>>>
>>>> [org.hibernate.mapping.Column(value)]
>>>>
>>>> org.hibernate.MappingException: Could not determine type for:
>>>>
>>>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>>>
>>>> table: steptelegramcontent, for columns:
>>>>
>>>> [org.hibernate.mapping.Column(value)]
>>>>
>>>>
>>>>
>>>> Any help is appreciated!
>>>>
>>>>
>>>>
>>>> Cheers
>>>>
>>>> Björn
>>>>
>>>>
>>>
>
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Goto Forum:
Current Time: Wed Sep 25 23:46:28 GMT 2024
Powered by FUDForum. Page generated in 0.03499 seconds
|