-->
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: hibernate mapping for sqlserver varbinary type
PostPosted: Sat Sep 08, 2007 5:25 am 
Beginner
Beginner

Joined: Sat May 12, 2007 2:55 am
Posts: 24
Hi friends,

for a table Table1 i have three fields id int(4) , username nvarchar(50) and password varbinary(255), can somebody suggest how shall my mapping file be? i tried using byte[] but its not working. also from action class when creating this user i am converting this password string to byte[] and then trying to store with the help of model again there over type for password is byte[]. can somebody pl. help?

here is my mapping file:

<hibernate-mapping>
<class name="com.x.y.models.Table1" table="table1">
<id name="id" type="int">
<column name="id" />
<generator class="identity" />
</id>
<property name="username" type="java.lang.String">
<column name="username" not-null="true" />
</property>
<property name="password" type="java.lang.byte[]">
<column name="password" not-null="true" />
</property>
</hibernate-mapping>

pl. suggest what should be type in hibernate model for password?


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.