-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Component fetched as Null
PostPosted: Thu Nov 09, 2006 8:31 pm 
Newbie

Joined: Thu Nov 02, 2006 7:35 pm
Posts: 4
Hi,
For the following mapping, the attendees component is always fetched as NULL, unless I can the DBVal getter. How can I make sure 'attendees' component gets populated by a non-null value during the session.list() call? Right now I'm getting it back as null, in the list after the session.list() call. I'd like to do two things:
1). Get the attendees value populated during the initial list() call. (Lazy=false does not seem to work)
2). If the attendees column is null, I'd like to initilize the attendees component with a (new CoreIDList()) value, rather than having a null returned from the list() call.

Thanks!

Regards

Haroon

Hibernate version:
3.1

Mapping documents:
<class name="app.aor.bo.AorEntity"
table="aor">

<!-- Primary Key -->
<id name="aor_id">
<generator class="increment"/>
</id>


<!-- Direct Data Properties -->
<property name="entity_id" />
<property name="aor_dt" />
<property name="location" />
<component name="attendees" class="com.invx.fresh.elementpool.CoreIDList">
<property name="DBValue" column="attendees" lazy="false"/>
</component>

</class>



Name and version of the database you are using:
Oracle8

The generated SQL (show_sql=true):
select aorentity0_.aor_id as aor1_0_, aorentity0_.entity_id as entity2_0_, aorentity0_.aor_dt as aor3_0_, aorentity0_.location as location0_, aorentity0_.attendees as attendees0_ from aor aorentity0_


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.