-->
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.  [ 3 posts ] 
Author Message
 Post subject: database procedure/function question
PostPosted: Wed Aug 11, 2004 11:56 am 
Newbie

Joined: Sat Feb 21, 2004 1:34 pm
Posts: 12
Location: Denver, Colorado
Hopefully this is another simple question:

I have a column in a pre-existing database that is storing an encrypted password. Built into the database is a procedure/function that decrypts this password for me on retrieval.

This is an oracle database.

The normal sql for this is:

select passwordDecrypt(password) from PasswordTable;

passwordDecrypt being the procedure/function and password is the column name.

Is there any way to map this into hibernate easily? I thought about using my own UserType but then I would have to duplicate the decrypt procedure in java code which I would like to avoid.

Any useful suggestions would be appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 1:40 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
if you don't have to update this column, use formula tag in the mapping file

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 3:09 pm 
Newbie

Joined: Sat Feb 21, 2004 1:34 pm
Posts: 12
Location: Denver, Colorado
Perfect! Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.