I don't see your test class as a peristent class. Unless you add hibernate annotations
it won't become as such.
For the simple class you mentioned, if you are instantiating it and setting it's id,
then you should see the correct result.
Once you implement hibernate, retrieving this object from hibernate's query language
should populate id correctly provided id is a not a null field. If you make id as
hibernate generated or db generated field then this id field will not be populated unless
you persist it first. Hope this helps.
Mahesh
Date: Thu, 21 Feb 2008 17:17:37 +0100> From:
krokodylowy3(a)wp.pl> To: rules-users(a)lists.jboss.org> Subject: [rules-users] Working
witj Hibernate objects> > Hi> > I'm testing rules with Hibernate objects
(classes generated by Eclipse> JBoss plugin). Do I need any additional annotations in
Hibernate class?> > > My simply test fails with "The field testTable.id is
not visible" error> > my rule: > > rule "Init message">
when> m : TestTable(id <100) > (..)> > my test class :> > public
class TestTable implements java.io.Serializable {> private int id;> public int
getId() {> return this.id;> }> public void setId(int id) {> this.id = id;>
}(..)> > ----------------------------------------------------> Mucha zaręczyła
się z Wojewódzkim?>
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fzareczyny.html...
> > _______________________________________________> rules-users mailing list>
rules-users(a)lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
_________________________________________________________________
Post free property ads on Yello Classifieds now!
www.yello.in
http://ss1.richmedia.in/recurl.asp?pid=219