The way your table is structured, if it's got an ID, it would need to be an entity. If it can be tracked without the ID (And just the name) then it could just be a column in your program table.
I honestly don't know how to map what you've got with an Enum, I can only think of how to do it with an Entity. I don't know if it's possible to map that as an enum without changing the schema a bit. But you might want to head over to nhusers <http://groups.google.com/group/nhusers> and repost your question there. They're more familiar with strange cases of NHibernate mappings. On Wed, Jan 27, 2010 at 4:25 AM, Dani <[email protected]> wrote: > Hi, > I have this problem to map: > > tblProgram > { > int programID (PK) > String Program Name > } > > tblProgramType > { > int programTypeID (PK) > String programTypeName > } > > tblProgramProgramTypes > { > int ProgramID (PK) > int ProgramTypeID (PK) > } > > On the c# side - > The ProgramType is an enum (I don't want to create a class for that) > > How do I map the program class to the join table to programtypes ? > > HasManyToMany doesn't support custom types, and it looks like I need > to create a class for type and can't use enums.... > > Thanks, > Dani > > -- > You received this message because you are subscribed to the Google Groups > "Fluent NHibernate" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<fluent-nhibernate%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/fluent-nhibernate?hl=en. > > -- - Hudson http://www.bestguesstheory.com http://twitter.com/HudsonAkridge -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en.
