[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread aemami
I changed my code to the following: private ISessionFactory CreateSessionFactory() { AutoPersistenceModel mappings = AutoPersistenceModel .MapEntitiesFromAssemblyOf() .Where(x => x.Name == typeof(T).Name); mappings.Convention

[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread James Gregory
Something that limits the automapper, perhaps to a single namespace. On Wed, Mar 4, 2009 at 7:53 PM, aemami wrote: > > What should it be changed to? > > On Mar 4, 11:47 am, James Gregory wrote: > > I'd imagine your Where(x => true) will be causing problems, as it'll try > to > > map everything

[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread aemami
What should it be changed to? On Mar 4, 11:47 am, James Gregory wrote: > I'd imagine your Where(x => true) will be causing problems, as it'll try to > map everything in there. > > On Wed, Mar 4, 2009 at 7:32 PM, aemami wrote: > > > Hi Ramana, thank you for the reply. > > > I am getting the foll

[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread James Gregory
I'd imagine your Where(x => true) will be causing problems, as it'll try to map everything in there. On Wed, Mar 4, 2009 at 7:32 PM, aemami wrote: > > Hi Ramana, thank you for the reply. > > I am getting the following error: > > {"Late bound operations cannot be performed on types or methods for

[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread aemami
Hi Ramana, thank you for the reply. I am getting the following error: {"Late bound operations cannot be performed on types or methods for which ContainsGenericParameters is true."} When trying to do the following: private ISessionFactory CreateSessionFactory() { Aut

[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread Ramana Kumar
Hi aemami Please look at the solution in the thread http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/1b63e8aaedba007 . I had put out a solution to the exact same problem. HTH Ramana On Wed, Mar 4, 2009 at 6:18 AM, James Gregory wrote: > There's nothing in FNH to do the actual

[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread James Gregory
There's nothing in FNH to do the actual name conversion, but you could create an ITypeConvention implementationwhich would handle your properties - you'd just need to handle the ids. public class ColumnNameConvention : ITypeConventio

[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread Andrew Stewart
Hi Unless someone can point to something I don't know about then the column name is always mapped to the property name. But please put this in the defect log(I'm hoping there's a feature request section) or we're always welcome to recieve a patch. To patch this you'd have to modify the PropertyMap