Lazy Load Many-To-One

1 view
Skip to first unread message

Matt Quackenbush

unread,
Jul 11, 2008, 5:31:14 AM7/11/08
to transf...@googlegroups.com
In my Transfer config I have defined a m2o (named TimeZone), and have set it lazy="true".  So far, so good.  My understanding from the docs (http://docs.transfer-orm.com/wiki/Using_Lazy_Loading.cfm) was that once I called getTimeZone() the object would then be loaded.  However, I keep getting an exception thrown, telling me that the Many-to-One has not been loaded.

What am I doing wrong?


Thanks,

Matt

Robert Rawlins

unread,
Jul 11, 2008, 5:44:33 AM7/11/08
to transf...@googlegroups.com

Hi Matt, good to see you mate.

 

Have you got a snippet of your transfer XML? Just so we can be sure nothing is wrong with that. Another guess would be that the relationship doesn’t exist in the database, so there is no timezone record in the database which links back to the object you’re calling ‘getTimeZone()’ on.

 

Rob

Matt Quackenbush

unread,
Jul 11, 2008, 5:50:32 AM7/11/08
to transf...@googlegroups.com
Okay.  I figured out what I'm doing wrong.  Except that it's not exactly "wrong", per se.  In this m2o relationship, the TimeZone can be NULL.  The record that I was loading, it is indeed NULL, which leads to the exception being thrown.

Matt Quackenbush

unread,
Jul 11, 2008, 5:51:46 AM7/11/08
to transf...@googlegroups.com
Ayep.  That was it.  You get the bonus prize.  :-)

Robert Rawlins

unread,
Jul 11, 2008, 5:54:15 AM7/11/08
to transf...@googlegroups.com

Cha’mone!

Reply all
Reply to author
Forward
0 new messages