Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » CDO Hibernate Store ID Integer problem
CDO Hibernate Store ID Integer problem [message #747709] Mon, 24 October 2011 08:34 Go to next message
Herve Ferreira is currently offline Herve FerreiraFriend
Messages: 31
Registered: October 2011
Member

When I'm using CDO populate example It throws the following exception

[ERROR] Rollback in HibernateStore: java.lang.IllegalArgumentException: The ID value type class java.lang.Integer is not supported by this store. Method called with CDOClassifierRef(http://ojeandb/1.0, CaixaValores)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateUtil.createCDOID(HibernateUtil.java:583)


The hbm for this entity is

<class entity-name="CaixaValores" abstract="false" lazy="true" table="`caixavalores`">
<meta attribute="eclassName" inherit="false">CaixaValores</meta>
<meta attribute="epackage" inherit="false">http://ojeandb/1.0</meta>
<tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
<tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
<id name="id" type="int" unsaved-value="0">
<column not-null="true" unique="false" name="`id`"/>
<generator class="identity"/>
</id>
<property name="resourceID" type="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOIDUserType">
<column name="resource_id"/>
</property>
<property name="containerID" type="string">
<column name="container_id"/>
</property>
<property name="version" type="java.lang.Integer">
<meta attribute="version">true</meta>
<column name="version"/>
</property>
<property name="nome" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`nome`"/>
</property>
<list name="aneis" lazy="true" cascade="all,delete-orphan">
<key update="true" foreign-key="caixavalores_aneis">
<column name="`caixavalores_aneis_id`" not-null="false" unique="false" index="CaixaValores_aneis"/>
</key>
<list-index column="`caixavalores_aneis_idx`"/>
<one-to-many entity-name="Aneis"/>
</list>
</class>



This example was retreived from examples that I made with Teneo and it works ok

So what's the problem now with CDO?

Thanks in Advance
Re: CDO Hibernate Store ID Integer problem [message #747720 is a reply to message #747709] Mon, 24 October 2011 08:40 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Probably Long (instead of int) will work fine.

gr. Martin

On 10/24/2011 10:34 AM, Herve Ferreira wrote:
>
> When I'm using CDO populate example It throws the following exception
>
> [ERROR] Rollback in HibernateStore: java.lang.IllegalArgumentException: The ID value type class java.lang.Integer is not
> supported by this store. Method called with CDOClassifierRef(http://ojeandb/1.0, CaixaValores)
> at org.eclipse.emf.cdo.server.internal.hibernate.HibernateUtil.createCDOID(HibernateUtil.java:583)
>
>
> The hbm for this entity is
>
> <class entity-name="CaixaValores" abstract="false" lazy="true" table="`caixavalores`">
> <meta attribute="eclassName" inherit="false">CaixaValores</meta>
> <meta attribute="epackage" inherit="false">http://ojeandb/1.0</meta>
> <tuplizer entity-mode="pojo" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
> <tuplizer entity-mode="dynamic-map" class="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionTuplizer"/>
> <id name="id" type="int" unsaved-value="0">
> <column not-null="true" unique="false" name="`id`"/>
> <generator class="identity"/>
> </id>
> <property name="resourceID" type="org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOIDUserType">
> <column name="resource_id"/>
> </property>
> <property name="containerID" type="string">
> <column name="container_id"/>
> </property>
> <property name="version" type="java.lang.Integer">
> <meta attribute="version">true</meta>
> <column name="version"/>
> </property>
> <property name="nome" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`nome`"/>
> </property>
> <list name="aneis" lazy="true" cascade="all,delete-orphan">
> <key update="true" foreign-key="caixavalores_aneis">
> <column name="`caixavalores_aneis_id`" not-null="false" unique="false" index="CaixaValores_aneis"/>
> </key>
> <list-index column="`caixavalores_aneis_idx`"/>
> <one-to-many entity-name="Aneis"/>
> </list>
> </class>
>
>
>
> This example was retreived from examples that I made with Teneo and it works ok
>
> So what's the problem now with CDO?
>
> Thanks in Advance


--

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 Hibernate Store ID Integer problem [message #747812 is a reply to message #747720] Mon, 24 October 2011 09:50 Go to previous message
Herve Ferreira is currently offline Herve FerreiraFriend
Messages: 31
Registered: October 2011
Member

Yap, after change it to long it work ok.

Thanks
Previous Topic:[Dawn] Problem in Dawn***CanonicalEditPolicy getCreateViewRequest
Next Topic:[Dawn] DawnGMFHandler.Adapter Notifications, Performance Issue
Goto Forum:
  


Current Time: Wed Apr 24 20:39:55 GMT 2024

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

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

Back to the top