<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<BR>I don't see your test class as a peristent class. Unless you add hibernate annotations it won't become as such.<BR>
For the simple class you mentioned, if you are instantiating it and setting it's id, then you should see the correct result.<BR>
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.<BR>
<BR>
Mahesh<BR>
<BR>> Date: Thu, 21 Feb 2008 17:17:37 +0100<BR>> From: krokodylowy3@wp.pl<BR>> To: rules-users@lists.jboss.org<BR>> Subject: [rules-users] Working witj Hibernate objects<BR>> <BR>> Hi<BR>> <BR>> I'm testing rules with Hibernate objects (classes generated by Eclipse<BR>> JBoss plugin). Do I need any additional annotations in Hibernate class?<BR>> <BR>> <BR>> My simply test fails with "The field testTable.id is not visible" error<BR>> <BR>> my rule: <BR>> <BR>> rule "Init message"<BR>> when<BR>> m : TestTable(id <100) <BR>> (..)<BR>> <BR>> my test class :<BR>> <BR>> public class TestTable implements java.io.Serializable {<BR>> private int id;<BR>> public int getId() {<BR>> return this.id;<BR>> }<BR>> public void setId(int id) {<BR>> this.id = id;<BR>> }(..)<BR>> <BR>> ----------------------------------------------------<BR>> Mucha zar�czy�a si� z Wojew�dzkim?<BR>> http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fzareczyny.html&sid=230<BR>> <BR>> <BR>> _______________________________________________<BR>> rules-users mailing list<BR>> rules-users@lists.jboss.org<BR>> https://lists.jboss.org/mailman/listinfo/rules-users<BR><BR><br /><hr />It's about getting married. Click here! <a href='http://ss1.richmedia.in/recurl.asp?pid=201' target='_new'>Try it!</a></body>
</html>