-->
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.  [ 2 posts ] 
Author Message
 Post subject: Can you call native sql for just 1 column?
PostPosted: Tue Sep 16, 2008 12:10 pm 
Newbie

Joined: Mon Sep 01, 2008 12:20 pm
Posts: 3
mapping file (a bit stripped down for clarity):


User.hbm.xml
----------------

<hibernate-mapping>

<class name="com.myApp.user.User" table="USER">

...........

<property name="emailAddress" type="java.lang.String">
<column name="EMAIL_ADDRESS" length="80" not-null="true" />
</property>

<property name="password" type="java.lang.String">
<column name="PASSWORD" length="25" not-null="true" />
</property>

...............

</class>
</hibernate-mapping>



I want to know whether its possible to specify some native sql for just 1 field in my mapping file - ie. for the 'password' field, or would I need to specify the whole SELECT in a named <sql-query> in this case?


I need to use the MySQL decode() function to retrieve my passwords since encode() has been used to put them in. :=(


Top
 Profile  
 
 Post subject: are you telling me no one here can answer this?
PostPosted: Wed Sep 17, 2008 12:13 pm 
Newbie

Joined: Mon Sep 01, 2008 12:20 pm
Posts: 3
are you telling me no one here can answer this?

If no-one can give me a yes/no on this then this is a reason to abandon Hibernate in my view - it cant be that hard come on..


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

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.