On Thu, May 29, 2008 at 1:30 PM, Ifnu _ <[EMAIL PROTECTED]> wrote: >>> p.comment is null > > eh bentar2, kan relationship antara BlogPost dan BlogComment itu > OneToMany, dan properti comments harusnya sebuah list : > > @OneToMany(mappedBy="post") > List<BlogComment> comments = new ArrayList<BlogComment>(); > > tetep nggak nih kondisi wherenya p.comments is null ? nggak masalah ya > mau collection atau single value? >
gunakan is empty http://www.hibernate.org/hib_docs/v3/reference/en/html/queryhql.html#queryhql-expressions Untuk single property, harus is null, karena null handling di database memerlukan perlakuan khusus. -- Endy Muhardin http://endy.artivisi.com Y! : endymuhardin -- life learn contribute --