-->
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: Setting criteria that are not part of an object's properties
PostPosted: Sat Jul 30, 2005 2:05 pm 
Newbie

Joined: Sat Jul 30, 2005 1:56 pm
Posts: 1
Hi!

I'm dealing with an object implementing the System.Security.Principal.IIdentity interface. I would like to persist my object through NHibernate, and currently that's not the problem.

The thing is, that I would not like to store the password with my object, that is, I would not like to have to make a MyIdentity.Password property. Still, I would like to authenticate an identity using the password. So, having my ISession object, how can I add the password as a criteria to select the identity from the database, eventhough there is no Password property on my object?

I thought about using the Expression.Sql method, but is there a cleaner approach? Would it be a nicer approach to just create the before mentioned property, since I'll also need it if there's a need to change and persist the password?

Thanks in advance,
Patrick


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.