-->
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: yet another 'Fail to convert to internal representation'
PostPosted: Sun Jul 27, 2008 2:13 pm 
Newbie

Joined: Thu Apr 17, 2008 3:46 pm
Posts: 5
Hibernate 3.2 / Spring 2.55 stack / oracle 9.2.0.8.0

I have a mapping of a domain object called 'Abc' which has a composite ID:

Code:
<hibernate-mapping>
  <class lazy="true" table="ABC" name="Abc">
    <composite-id name="id" class="AbcId">
      <key-property name="q" column="Q" type="java.lang.Integer"/>
      <key-property name="w" column="W" type="java.lang.Integer"/>
      <key-property name="e" column="E" type="java.lang.String"/>
      <key-property name="bad" column="BAD" type="java.lang.String"/>
    </composite-id>
  </class>
</hibernate-mapping>


I have another object called 'Audit' which has a many to one relationship with Abc:
Code:
<hibernate-mapping>
  <class lazy="true" table="AUDIT" name="Audit">
    <id name="id" type="big_decimal" column="ID">
      <generator class="sequence">
        <param name="sequence">AUDIT_SEQ</param>
      </generator>
    </id>
    <many-to-one insert="false" update="false" class="Abc" fetch="select" name="abc">
      <column name="Q"/>
      <column name="W"/>
      <column name="E"/>
      <column name="BAD"/>
    </many-to-one>
  </class>


When I do a simple query of Audit (from Audit as a where a.id = ?)... i get the following exception:
INFO: could not read column value from result set: BAD13_6_; Fail to convert to internal representation
........
error code [17059]; Fail to convert to internal representation; nested exception is java.sql.SQLException: Fail to convert to internal representation

So it seems to have a problem with 'BAD'. Although when I do a direct query of 'Abc'... I have no problems.....

I have tried taking away the relationship to 'Abc' from Audit by just including Abc's Id components as properties in Audit. And that seems to query just fine...... although I need that relationship to retrieve other data from Abc.... and it just seems like its the right thing to do.

I can also tell you that 'BAD' is a varchar2(1)..... and I think if it maps back to a string it should still work.

Any ideas out there?

Thanks in advance


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.