Is the order of Genres assigned to shows important to you? If it is,
you will need a column in the database to store the index. If it
isn't, don't use an indexed interface like IList<>, use ICollection<>
or ISet<> instead.

Apart from that, what problems are you experiencing?

/Oskar



2010/7/6 Buddy Lindsey, Jr. <percen...@gmail.com>:
> I posted this on StackOverflow, since I usually get a decently quick
> response, but had several views and it is either confusing or a difficult
> problem or I can't explain it at all. I figured i'd give this mailing list a
> shot, not ever asked a question on one before. So here goes:
>
> Here is my Database Strucutre:
>
> Shows
> ID
> Name
>
> Genres
> ID
> Name
>
>
> ShowsGenres
> ShowsID
> GenresID
>
> Above is my Database I am trying to figure out how to map this properly. My
> Show object is like this:
>
> public class Show
> {
>
>     public virtual int ID { get; set; }
>
> public virtual string Name { get; set; }
>
> public virtual IList<Genre> Genres { get; set; }
>
> }
>
> My Genre Object is:
>
> public class Genre
> {
>
>     public virtual int ID { get; set; }
>
>     public virtual string Name { get; set; }
>
>     public virtual IList<Show> Shows { get; set; }
>
> }
>
> I have tried several different variations of HasManyToMany, but none work
> the way I want them to.
>
> I need to be able to delete a show and the relationship with the genre, or
> many genres, but not delete the genre(s).
>
> I need to be able to delete a genre and its relationship with a show, or
> many shows, but not delete the show(s).
>
> I would also need to be able to remove the relationship between a show and a
> genre without removing the show or the genre.
>
> How can I map this or do I need to try something differently?
>
> Thanks,
> Buddy
>
> ---
> Buddy Lindsey
> http://www.buddylindsey.com
> http://www.twitter.com/buddylindsey
>
> --
> You received this message because you are subscribed to the Google Groups
> "Fluent NHibernate" group.
> To post to this group, send email to fluent-nhibern...@googlegroups.com.
> To unsubscribe from this group, send email to
> fluent-nhibernate+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/fluent-nhibernate?hl=en.
>

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

Reply via email to