-->
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: Inert into User (name, pass, id) values (?, password(?), id)
PostPosted: Mon Oct 27, 2003 4:02 am 
Newbie

Joined: Mon Oct 27, 2003 3:46 am
Posts: 1
I'm a newbee of Hibernate..

I create the User Table.
-----------------------------------------------------
create table User
(
name char(8) not null,
pass char(30) not null,
id char(8) not null,
primary key(id)
);
-----------------------------------------------------


Persistent Object is the following.

-----------------------------------------------------
public User
{
private name, pass,id;
public String getName(){};
public String getPass(){};
public String getId(){};
public void setName(String name){};
public void setPass(String pass){};
public void setId(String id){};
}
-----------------------------------------------------




I want to put new user like the following..
Inert into User (name, pass, id) values (?, password(?), id)

password(...) is the db-function of mysql.

like preceding,
I want to encrypt user password by sql-function, password().

I cannot find any solution for this...
Property formula was no effect on inserting.(But for loading, it is effective..)


Any Advices to this problem will help me...

neosuper@cyber-r.com

-----------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
<class name="User" table="User">
<id name="id" column="id">
<generator class="assigned" />
</id>

<property name="name" not-null="false" />
<property name="pass" not-null="false" formula="passsword(pass)"/>
</class>

</hibernate-mapping>
-----------------------------------------------------


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 27, 2003 8:56 am 
Regular
Regular

Joined: Tue Sep 16, 2003 11:35 am
Posts: 93
Location: San Francisco, CA
see

http://forum.hibernate.org/viewtopic.ph ... t=password


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.