-->
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.  [ 6 posts ] 
Author Message
 Post subject: Lazy Component
PostPosted: Mon Oct 31, 2005 9:17 pm 
Senior
Senior

Joined: Sat Sep 10, 2005 3:46 pm
Posts: 178
It doesn't appear to be possible to lazy Load a component. I was thinking that I could simulate this with a Lazy one-to-one mapping. So I was wondering if it would be possible to map a one-to-one assosciation to the same table? There is an attribute named foreign-key that pops up in my schema intellisense for a one-to-one mapping but I can't find any documentation on this attribute. What is it used for?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 6:10 pm 
Beginner
Beginner

Joined: Mon Aug 15, 2005 11:38 am
Posts: 28
have the same problem. I have entries in my database that store SOAP messages (> 100kb) and additional data about those messages. When I retrieve those entries, I don't want to load the XML data with each entry because it's a server app.

I read about the lightweight class pattern or so, where I use a base and a derived class, one w/o XML field and one with it. However, that sounds like overkill to me because right now I'd already have to do that for 10 domain classes, and still growing.

My question is if it is possible either with one-to-one or with a component to get a lazy load behavior. I read somewhere that if the linked class only has virtual properties, I can get proxy behavior. However, I couldn't find the place anymore and especially no instructions of how to do that.

If anybody could give us a hint, that's be reeeaaally great. Yeeaah!

Thanks, Christoph


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 8:59 pm 
Regular
Regular

Joined: Tue May 24, 2005 12:55 pm
Posts: 56
Too the best of my knowledge componets can not be lazy-loded. They are data from the same table, but are broken out as a seperate class. The only way to hide data from a table in it's class is to not map it or use sub classing (inheritance).


Top
 Profile  
 
 Post subject: One-to-one into same table.
PostPosted: Thu Nov 10, 2005 2:39 pm 
Expert
Expert

Joined: Fri May 13, 2005 11:13 am
Posts: 292
Location: Rochester, NY
jnapier wrote:
So I was wondering if it would be possible to map a one-to-one assosciation to the same table?


I am interested to see if you tried this and had any success. It seems like it would be very useful for big BLOB columns (at least for reading).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 10, 2005 2:55 pm 
Senior
Senior

Joined: Sat Sep 10, 2005 3:46 pm
Posts: 178
I never got it to work and I am having the same problems with blob columns. I tried to set up a one to one relationship and have my blob as its own object but I cant get that to work either. See my posts in this thread:

http://nhibernate.sourceforge.net/forum/viewtopic.php?t=245

Blob columns are a major pain for me right now. All Im trying to do is come with a design that makes them even practical to use with NHibernate.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 10, 2005 5:03 pm 
Senior
Senior

Joined: Thu Jun 02, 2005 5:03 pm
Posts: 135
Location: Paris
Hi jnapier,

I've responded to this issue in one of your other threads as it seemed more relevant there: http://nhibernate.sourceforge.net/forum/viewtopic.php?t=245

Cheers,

Symon


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

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.