Yes, as Fabio wrote, use the <any> tag

/K

On Jul 13, 7:37 am, Peter Forstmeier <[email protected]>
wrote:
> Hi all,
> i follow this thread because i'm very interested on the same subject.
> I didn't see any solution right now. Did i miss something.
>
> Peter
>
> On 12 Jul., 13:53, Diego Mijelshon <[email protected]> wrote:
>
> > Uh?
>
> > What performance problem are you worried about exactly?
>
> >     Diego
>
> > On Sun, Jul 11, 2010 at 22:50, Vekaz Turković <[email protected]> wrote:
> > > Thank you Diego, I was afraid this will end up unanswered :) That was one
> > > way I considered doing it, but there's also Activities who are,
> > > relationship-wise, the same as notes. Both Notes and Activities will most
> > > probably hold a lot of data. I am afraid that, with so many relationships,
> > > performance might become an issue pretty soon. Would it be possible to 
> > > use a
> > > denormalized database; Note would hold type and id of the entity it is
> > > attached to?
>
> > > On Sun, Jul 11, 2010 at 11:43 PM, Diego Mijelshon 
> > > <[email protected]>wrote:
>
> > >> This was discussed last month (
> > >>http://groups.google.com/group/nhusers/browse_thread/thread/973df7dce...)
> > >> and it is certainly on topic :-)
>
> > >> In short: the model is simple. Several classes have a collection of notes
> > >> (or, more precisely, a List, because the order probably matters). You 
> > >> could
> > >> create an interface (IHaveNotes) to deal with this in your code and make 
> > >> it
> > >> easy to add/retrieve notes from any entity.
>
> > >> Then, you have at least two possible ways to map this:
> > >> - Note is a component type, there is one table per Notes collection
> > >> - Note is an entity, there is one table for the Notes and a many-to-many
> > >> table per each collection, mapped with cascade="all-delete-orphan"
>
> > >> Note that the data implementation should NOT change your model. It's
> > >> always an IList<Note>.
>
> > >>     Diego
>
> > >> On Sun, Jul 11, 2010 at 08:01, moohzor <[email protected]> wrote:
>
> > >>> Hi,
>
> > >>> This isn't strictly nhibernate related, but I thought this would still
> > >>> be the right place to ask.
>
> > >>> I have a Note entity, related to almost all other entities (you can
> > >>> attach a note to pretty much anything else). All these entities have a
> > >>> property to hold a collection of notes (but notes don't have to have
> > >>> reference to the entity they're related to). I don't know how to best
> > >>> model this in the database and map in hbm. How would you do this?
>
> > >>> Thanks in advance.
>
> > >>> --
> > >>> You received this message because you are subscribed to the Google 
> > >>> Groups
> > >>> "nhusers" group.
> > >>> To post to this group, send email to [email protected].
> > >>> To unsubscribe from this group, send email to
> > >>> [email protected]<nhusers%[email protected]­>
> > >>> .
> > >>> For more options, visit this group at
> > >>>http://groups.google.com/group/nhusers?hl=en.
>
> > >> --
> > >> You received this message because you are subscribed to the Google Groups
> > >> "nhusers" group.
> > >> To post to this group, send email to [email protected].
> > >> To unsubscribe from this group, send email to
> > >> [email protected]<nhusers%[email protected]­>
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/nhusers?hl=en.
>
> > >  --
> > > You received this message because you are subscribed to the Google Groups
> > > "nhusers" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<nhusers%[email protected]­>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/nhusers?hl=en.-Zitierten Text ausblenden -
>
> > - Zitierten Text anzeigen -

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

Reply via email to