-->
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: Custom UserType for id
PostPosted: Fri Apr 18, 2008 8:12 pm 
Newbie

Joined: Thu Apr 17, 2008 12:50 pm
Posts: 5
I searched High and Low and cannot get a definitive answer, so hopefully someone can help me here.

This is my Hibernate mapping:

<class name="org.acord.standards.pc_surety.acord1_12_0.xml.PCPOLICY" table="ZEUS_REP.POLICY_INQUIRY_MV">
<id name="id" column="POLICY_NO" type="com.ze.policyinquiry.persistence.C25UserType">
<generator class="com.ze.policyinquiry.persistence.C25Generator"/>
</id>
<property name="policyStatusCd" column="POLICY_STATUS" type="string"/>
<property name="controllingStateProvCd" column="POLICY_STATE" type="string"/>
</class>


With or without a custom generator I get the same exception:

java.lang.ClassCastException: org.acord.standards.pc_surety.acord1_12_0.xml.C25
at org.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:1097)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:565)
at org.hibernate.loader.Loader.doQuery(Loader.java:701)

Am I following the wrong lead? Is there a different problem?

Thanks in advance,

-Allon


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.