-->
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: Proxy Problem
PostPosted: Wed Jun 14, 2006 10:07 am 
Beginner
Beginner

Joined: Wed Jun 14, 2006 9:44 am
Posts: 22
Hi,

I´m learning .NET and NHibernate now. I´m with problem.
The NHibernateUtil.Initialize and NHibernateUtil.IsInitialize doesn´t work
for me. For example the method to get a class with attributes that are classes too:

Code:
Company Company = (Company) session.Get(typeof(Company), pId);

if (!NHibernateUtil.IsInitialized(Company.Group))
   NHibernateUtil.Initialize(Company.Group);


I try to initialize the Group, but this object is with the null attributes.
When I pass to the line if (!NHibernateUtil.IsInitialized(Company.Group)),
It doesn´t enter on the if block to initialize, but all attributes are null.

What happens in this case???

thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 14, 2006 10:52 am 
Beginner
Beginner

Joined: Wed Jun 14, 2006 9:44 am
Posts: 22
Hi,

I found the error, finally.
When use proxy to classes, all attributes must be virtual.

thank you!!!!


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.