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!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to