Hello.
In the database, I have an 'int4' (Postgresql) field
called 'parentId'. It is a foreign key reference that
may be null.
I'm mapping this 'int4' database field to an Integer
Java field.
Database
========
Type
----
id:int4
prnt_id:int4
Java
====
Type.class
----------
Integer id;
Integer parentId;
Mapping
=======
<class name="Type" identity="id">
<map-to table="type"/>
<field name="id" type="integer">
<sql name="id" type="integer"/>
</field>
<field name="parentId" type="integer">
<sql name="prnt_id" type="integer"/>
</field>
I tried to do a query for when the 'parentId' value is
null, but no results are being returned:
Query oql = db.getQuery("SELECT Type t where
t.parentId=$1");
oql.bind(null);
Any suggestions?
Thank you.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev