-->
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.  [ 2 posts ] 
Author Message
 Post subject: Mapping to a specific element in a list-two keys possible?
PostPosted: Sun Sep 25, 2005 4:02 am 
Newbie

Joined: Sat Sep 03, 2005 1:52 am
Posts: 8
I have seen doubts about Nhibernate performance and made some basic tests. After this I have decided that as always it is a question about thinking before acting.
This is my reason for asking you this question.
I am making a system where I need to optimize on this:

For many of my classes I have detailclasses (similar to Order - OrderDetails). I also have detailtypes and each detail have a specific type as a property.
When working with instances of these classes the user either works with lists of details or work with a specific detailtype.
I have in my classes a nonpersistent property: CurrentDetailType.
When this is set there is an opportunity to point directly to an element in the detaillist. Keys in db: ID from class and DetailTypeID.
I have done this in my preNhibernate days where I had a property:
CurrentDetail. This could be instantiated directly without iterating through the detaillist and finding the detail.
Ie.: the class maps in two ways to the same class. one-to-one and one-to-many.
Is it possible somehow to achieve the same with NHibernate?
Thanks beforehand. And a lot of applause to all of you who works on NHibernate and makes our life much easier.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 26, 2005 6:41 pm 
Contributor
Contributor

Joined: Sun Jun 26, 2005 5:03 am
Posts: 51
Location: London, UK
Can you post the mapping files and the classes as I'm not quite sure of the relationships yet.

_________________
Paul Hatcher
NHibernate Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.