Let me show you how do i think.
how do u map this data schema ?

Table: Items
Column: ItemID (int) (identity)
Column: ItemName (string)
Column: ItemUrl (string)

Table: Tags
Column: TagID (int) (identity)
Column: ItemID (int) (foreign key from Items)
Column: PrincipalTag (string)

Table: TagWords
Column: TagID (int) (foreign key from Tags)
Column: Word (string)

Item has a list of Tags that has a list of TagWords

Anyway, TODAY, I don't think that exists an way to map this
tables using just *one mapped class* (Item).

i know that It can be implemented using *two mapped classes* (Item and Tag)


Someone got what i'm trying to say ?

---
A vida me ensinou a nunca desistir,
nem ganhar, nem perder mas procurar evoluir.
Podem me tirar tudo que tenho!
Só não podem me tirar as coisas boas que eu já fiz pra quem eu amo!
E eu sou feliz e canto e o universo é uma canção eu vou que vou!


On Sun, Jun 28, 2009 at 6:17 PM, Fabio Maulo <fabioma...@gmail.com> wrote:

> I think you are mapping strange things.
>
>
> 2009/6/28 Fernando Zago <nan...@gmail.com>
>
>> ok, i've been think in something like this:
>>
>>       <idbag name="Tags" table="Tags">
>>         <collection-id column="ItemTagID" type="int">
>>           <generator class="native"></generator>
>>         </collection-id>
>>         <key column="ItemID" />
>>         <composite-element class="ItemTag">
>>           <bag name="RefWords" table="RefWords"
>> cascade="all-delete-orphan">
>>             <key column="ItemTagID" />
>>             <element column="Word" type="string" length="256"
>> not-null="false" />
>>           </bag>
>>         </composite-element>
>>       </idbag>
>>
>>
>> bag will get the reference from idbag key.
>>
>> ---
>> A vida me ensinou a nunca desistir,
>> nem ganhar, nem perder mas procurar evoluir.
>> Podem me tirar tudo que tenho!
>> Só não podem me tirar as coisas boas que eu já fiz pra quem eu amo!
>> E eu sou feliz e canto e o universo é uma canção eu vou que vou!
>>
>>
>> On Sun, Jun 28, 2009 at 3:59 PM, Fabio Maulo <fabioma...@gmail.com>wrote:
>>
>>> 2009/6/28 Fernando Zago <nan...@gmail.com>
>>>
>>>> nHibernate 2.0.1 GA
>>>>
>>>
>>> sorry... I have asked because I have add some other things in component
>>> but you are looking for composite-element.
>>> There is no support for bug in composite-element so far.
>>> If you have time create a little test with a patch for the schema
>>> (probably a little change to the schema will be enough).
>>>
>>> --
>>> Fabio Maulo
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Fabio Maulo
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to