-->
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 type mapping for stored procedure return values
PostPosted: Thu Aug 13, 2009 1:54 pm 
Newbie

Joined: Tue Jun 30, 2009 10:13 am
Posts: 6
Good afternoon,

I am trying to implement a custom type mapping for a stored procedure call similar to the the following example:

Code:
  <class name="UserTypeImpl" table="ownUserType">
    ...
    <property name="Active" column="Active" type="com.purefacts.db.hibernate.type.BooleanType, SpringAir.Core" access="property"/>
    ...
  </class>


which maps the return values of '1' to true and '0' to false for the Active property.

Thus I coded up the following:

Code:
  <sql-query name="get_user_types">
    <return alias="user_type" class="UserTypeImpl">
      ...
      <return-property name="Active" column="Active" type="com.purefacts.db.hibernate.type.BooleanType, SpringAir.Core" />
      ...
    </return>
    get_user_types
  </sql-query>


but I am getting the following error:

Code:
type attribute is not declared


Are custom mappings like this supported in nHibernate 2.x?

Thanks in advance.

Whatty


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.