-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: The class has no identifier property
PostPosted: Thu Dec 14, 2006 7:44 am 
Newbie

Joined: Tue Oct 17, 2006 7:58 am
Posts: 6
Hi there, I have tried to insert a record in a table which is an in-between-table with the foreign keys, that are also the primary keys.

I got the following error message.

org.springframework.orm.hibernate.HibernateSystemException: The class
has no identifier property: eu.cec.immogest.realestate.TbReaInvestmnt;
nested exception is net.sf.hibernate.HibernateException: The class has
no identifier property: eu.cec.immogest.realestate.TbReaInvestmnt
net.sf.hibernate.HibernateException: The class has no identifier property: eu.cec.immogest.realestate.TbReaInvestmnt
at
net.sf.hibernate.persister.AbstractEntityPersister.getIdentifier(Abstr
actEntityPersister.java:314)

I have introduced in the TbReaInvestmnt.hbm.xml the following properties but it does not help.


<hibernate-mapping package="eu.cec.immogest.realestate">
<class
name="TbReaInvestmnt"
table="TB_REA_INVESTMNT">
<composite-id class="TbReaInvestmnt">
<key-many-to-one
name="realestate"
class="TbRealEstate"
column="REAL_ESTATE_ID"
/>
<key-many-to-one
name="investment"
class="TbInvestment"
column="INVESTMENT_ID"
/>
</composite-id>

<property
name="realestateId"
column="REAL_ESTATE_ID"
type="integer"
not-null="true"
insert="false"
update="false"
length="22"/>
<property
name="investmentId"
column="INVESTMENT_ID"
type="integer"
not-null="true"
insert="false"
update="false"
length="22"/>



</class>
</hibernate-mapping>


here is the code that is calling the corresponding DAO class.


tbReaInvestmntDAO.save(tbReaInvestmnt);

Could somebody try to help me understanding what's going wrong?
Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.