-->
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.  [ 4 posts ] 
Author Message
 Post subject: Using public fields in 1.2.0
PostPosted: Mon Nov 13, 2006 5:57 am 
Newbie

Joined: Thu Apr 27, 2006 6:03 am
Posts: 14
Hi,

I am using NHibernate 1.2.0Beta1 and creating a proxy instance fails because of public fields I am using within my classes.

Can you tell me why the use of public fields is not possible any more?

Rob


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 6:19 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
It was never really allowed. NHibernate cannot intercept access to public fields so it will not be able to initialize a proxy on the first access to it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 24, 2006 7:08 am 
Newbie

Joined: Thu Apr 27, 2006 6:03 am
Posts: 14
And what about public static fields? We use a public static readonly field to control the version of our generated classes.

Shouldn’t NHibernate handle static fields in another way, that is to say allow public static fields and ignore them in the proxy initialization process?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 24, 2006 7:41 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Yes, public static fields are allowed.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.