[fluent-nhib] Suggestion

2008-12-15 Thread ryzam
What do you think if we can use T4 to loop through all the domain model file and generate class map by follow convention over configuration pattern. For example we can set the prefix for for every reference type like GId for guid Cmp for component and Ref for ManyToOne public class Cargo { publi

[fluent-nhib] Re: Automap Strangeness with Layer Supertype

2008-12-15 Thread Nate Kohari
Yep, looks great. Thanks! -Nate On Dec 15, 11:16 am, "Andrew Stewart" wrote: > Hi Nate > Well that was harder than expected but I've just committed a fix for that. > You can now apply your supertype similar to below: > >             var autoMapper = AutoPersistenceModel >                     .M

[fluent-nhib] Re: Patch for auto map - detect , recognize many to many

2008-12-15 Thread Ayende Rahien
That is by design, the idea here is that only one side of the association is responsible for the associatio On Mon, Dec 15, 2008 at 8:25 PM, wrote: > > Hello, > > Should adding a parent to a child update the many-to-many table in the > database? In my current implementation, it seems that adding

[fluent-nhib] Re: cache usage not available?

2008-12-15 Thread Chris Marisic
I was attempting to get a second level cache up with the Velocity provider from the Nhib contrib trunk, setting the configure options to use cache.provider_name("nhibernate.cache.velocity") I ended up getting assembly not found and I have the provider in my solution and referenced in my nhib proje

[fluent-nhib] Re: Patch for auto map - detect , recognize many to many

2008-12-15 Thread jereme
Hello, Should adding a parent to a child update the many-to-many table in the database? In my current implementation, it seems that adding a child to the parent creates a record in the many-to-many table without a problem, but adding a parent to a child does not persist in the database. Maybe the

[fluent-nhib] Re: cache usage not available?

2008-12-15 Thread James Gregory
I've also added convention support for Cache too, incase anyone is interested. AutoPersistenceModel .MapEntitiesFromAssemblyOf() .WithConvention(c => c.DefaultCache = cache => cache.AsReadWrite()); On Mon, Dec 15, 2008 at 10:35 PM, James Gregory wrote: > Hi Marco, > It now is available :) > >

[fluent-nhib] Re: cache usage not available?

2008-12-15 Thread James Gregory
Hi Marco, It now is available :) Let me know how it works out. public MyClassMap() { Cache.AsReadOnly(); Id(x => x.Identity); } James On Mon, Dec 15, 2008 at 8:36 PM, Marco wrote: > > I'm trying to add > > > > to my Mapping Class. It's not yet available as a typed solution, but > how

[fluent-nhib] Re: using lambda expression to specify the property associated with a "foreign" id generator

2008-12-15 Thread Chris Constantin
Great! Thanks. On Mon, Dec 15, 2008 at 2:02 PM, James Gregory wrote: > I've just committed a change so you can now use a lambda for Foreign. > > On Mon, Dec 15, 2008 at 9:09 AM, James Gregory > wrote: >> >> That looks feasible, I'll have a go later. >> >> On Mon, Dec 15, 2008 at 6:01 AM, Chris

[fluent-nhib] Re: using lambda expression to specify the property associated with a "foreign" id generator

2008-12-15 Thread James Gregory
I've just committed a change so you can now use a lambda for Foreign. On Mon, Dec 15, 2008 at 9:09 AM, James Gregory wrote: > That looks feasible, I'll have a go later. > > > On Mon, Dec 15, 2008 at 6:01 AM, Chris Constantin > wrote: > >> >> Is it possible to replace: >> Id(x => x.Id) >>

[fluent-nhib] Re: exception when defining customsqltype and customtype

2008-12-15 Thread Marco
Thanks! that solved the problem On 12 dec, 02:12, "Paul Batum" wrote: > Hi Marco, > > At the moment the WithLengthOf method will throw an exception if you are not > mapping a string or a decimal. To be honest I am not exactly sure why this > behaviour was added - its something that should be loo

[fluent-nhib] cache usage not available?

2008-12-15 Thread Marco
I'm trying to add to my Mapping Class. It's not yet available as a typed solution, but how can i add this at this moment? Thanks Marco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group.

[fluent-nhib] Re: Mapping enums to INT values - not strings

2008-12-15 Thread Tuna Toksöz
NH has its own Generic Enum Mapper BTW On Mon, Dec 15, 2008 at 8:33 PM, Derick Bailey wrote: > > in NHibernate, the default mapping of an Enum is to an integer (at > least, I've never told it to do anything special, and it has always > mapped to my integer columns fine). In FluentNHibernate, the

[fluent-nhib] Mapping enums to INT values - not strings

2008-12-15 Thread Derick Bailey
in NHibernate, the default mapping of an Enum is to an integer (at least, I've never told it to do anything special, and it has always mapped to my integer columns fine). In FluentNHibernate, the default mapping is to a string, because of the GenericEnumMapper class: namespace FluentNHibernate.Ma

[fluent-nhib] Re: Automap Strangeness with Layer Supertype

2008-12-15 Thread Andrew Stewart
Hi Nate Well that was harder than expected but I've just committed a fix for that. You can now apply your supertype similar to below: var autoMapper = AutoPersistenceModel .MapEntitiesFromAssemblyOf() .Where(t => t.Namespace == "FluentNHibernate

[fluent-nhib] Re: Automap Strangeness with Layer Supertype

2008-12-15 Thread Andrew Stewart
Hi Just to let you know I'm having a few issues with passing tests, but a patch is on it's way. Andy On Mon, Dec 15, 2008 at 9:05 AM, James Gregory wrote: > Also typical, just as I start investigating somebody else answers faster ;) > > On Mon, Dec 15, 2008 at 9:03 AM, Andrew Stewart < > andrew.

[fluent-nhib] Re: using lambda expression to specify the property associated with a "foreign" id generator

2008-12-15 Thread James Gregory
That looks feasible, I'll have a go later. On Mon, Dec 15, 2008 at 6:01 AM, Chris Constantin wrote: > > Is it possible to replace: > Id(x => x.Id) >.GeneratedBy.Foreign("User"); > with > Id(x => x.Id) >.GeneratedBy.Foreign(x => x.User); > ? > > It would be

[fluent-nhib] Re: Automap Strangeness with Layer Supertype

2008-12-15 Thread James Gregory
Also typical, just as I start investigating somebody else answers faster ;) On Mon, Dec 15, 2008 at 9:03 AM, Andrew Stewart < andrew.stew...@i-nnovate.net> wrote: > Hello > > Someone found that problem then before I got chance to fix it typical :o) > Basically inorder to Automap inheritence mappi

[fluent-nhib] Re: Automap Strangeness with Layer Supertype

2008-12-15 Thread Andrew Stewart
Hello Someone found that problem then before I got chance to fix it typical :o) Basically inorder to Automap inheritence mappings it assumes that your base object is object if not then it maps it as an inherited joined class. I'll work on a fix and get it over to you. Andy On Mon, Dec 15, 2008