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: Everything Getting initialize when i use criteria query.
PostPosted: Tue Jun 19, 2007 10:40 am 
Newbie

Joined: Mon Apr 09, 2007 10:29 am
Posts: 14
Hi
Whenever I am getting list of objects when i use criteria query all the get Properties are being called(they are used to mapping).

And i initialize the object in get Property.
Is this is meant to happen.i have to use HQL or map the class variables.


public User CreatedBy
{
get
{
if (!NHibernate.NHibernateUtil.IsInitialized(_createdBy))
{
QuestionDA da = new QuestionDA();
da.LockObject(this);
NHibernate.NHibernateUtil.Initialize(_createdBy);
}
return _createdBy;
}
set { _createdBy = value; }
}

public DateTime CreatedOn
{
get
{
return _createdOn;
}
set { _createdOn = value; }
}

Saurabh


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.