Are you guys sure?

I have the following working for a HasMany with IUserType and the
existing code base:

HasMany<MyIUserTypeImplementation>(p => p.AllowedTypes()).

 
Access.AsCamelCaseField(Prefix.Underscore).AsElement("TicketType").AsBag
();

 

Where the MyIUserTypeImplementation is the IUserType rather than
allowint it to be implicitly determined to be a domain type.

 

 

 

From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of James Gregory
Sent: Wednesday, March 11, 2009 8:12 AM
To: fluent-nhibernate@googlegroups.com
Subject: [fluent-nhib] Re: HasMany Type Safe Enums

 

Tell me about it! ;)

On Wed, Mar 11, 2009 at 3:09 PM, David Woods <d...@solidhouse.com>
wrote:

No worries. I will continue with my workaround for now. If I can find
time I will look into contributing a patch for this functionality
(finding time is always the hardest part).

Dave



James Gregory wrote: 

Damn, well spotted. Looks like we haven't implemented support for this
kind of behavior yet. Sorry.

On Wed, Mar 11, 2009 at 2:50 PM, David Woods <d...@solidhouse.com>
wrote:

I got the IUserType stuff to work using a Map() and CustomTypeIs<> but I
don't see a CustomTypeIs<> method on a HasMany(). Am I going about this
the wrong way maybe?

I have worked around it using an intermediary object which works but is
a bit clunky :) 



James Gregory wrote: 

You need an NHibernate IUserType for Role, then you can specify that
with CustomTypeIs<MyUserType>() on your Roles property.

On Mon, Mar 9, 2009 at 5:13 PM, Dave Woods <d...@solidhouse.com> wrote:


I am doing manual mapping classes and I think I am stumped on this
one:

public class user
{
   public int UserId { get; set; }
   public string UserName { get; set; }
   public IList<Role> Roles { get; set; }
}

Public Class Role
{
   Public static Role AddPermit = New Role(1, "AddPermit")
   Public static Role SearchPermit = New Role(2, "SearchPermit")

   Private Sub New(int roleId, string roleName)
       _roleId = roleId
       _roleName = roleName
   End Sub
}

Schema:
User
UserId int
UserName varchar(100)

UserRoles
UserId int
RoleId int

Any hings on this one is greatly appreciated!







 

 





 

 





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@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