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.  [ 3 posts ] 
Author Message
 Post subject: Mapping for IDictionary<myClass, string>
PostPosted: Fri Oct 10, 2008 4:07 am 
Newbie

Joined: Fri Oct 10, 2008 4:01 am
Posts: 3
Hi,

I search mapping to nHibernate for implements IDictionary<myClass, string>.

I have read the documentation but I have not found, or I have don't understand.

I'm french and I speak a little english.

Thanks for your help !


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 13, 2008 2:59 am 
Regular
Regular

Joined: Tue Jul 29, 2008 3:30 am
Posts: 74
You are searching for the "map" mapping.
Like this:

A map from string indices to dates:
Code:
<map name="Holidays" table="holidays" schema="dbo" order-by="hol_name asc">
    <key column="id"/>
    <index column="hol_name" type="String"/>
    <element column="hol_date" type="Date"/>
</map>


Here is the documentation link:
http://www.nhforge.org/doc/nh/en/index. ... s-ofvalues


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 15, 2008 5:58 am 
Newbie

Joined: Fri Oct 10, 2008 4:01 am
Posts: 3
Thanks for your help !

In my project I have an class MyClass With :

public virtual IDictionary<SelectCriterion, string> SelectCriteriaValues { get; set; }

SelectCrition is :

public class SelectCriterion
{
public int ID { get; set; }
public string Label { get; set; }
}

I Have an NHibernate's mapping for SelectCriterion and for MyClass.

In the mapping for MyClass, I do not know how.

Sorry for my English very vague.


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