Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Nested LazyBean

 
Whitney Albrecht
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried implementing the NestedLazy Bean from:

http://www.niallp.pwp.blueyonder.co.uk/lazydynabean.html

However when I try to do something similar to the Order Book bean I get run into errors.

The first problem I run into is that since the customer does not exist (yet) I get a null returned from the following line:
DynaBean customer = (DynaBean)orderBook.get("customer", c);

So then I added a set method before the get;

orderBook.set("customer", c);
DynaBean customer = (DynaBean)orderBook.get("customer", c);

but ran when running the code ran into the ClassCastException error; which is thrown by the get line.

Has anyone been sucessful in using Nested Lazy beans? What am I missing or setting up wrong?

Thanks for you advice in advance.
[ September 09, 2005: Message edited by: Whitney Albrecht ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic