[fluent-nhib] Re: Referenced entity is null

2009-02-26 Thread Jamir Shaikh
Never mind, I had some issue with my object, which is getting initialize to NULL. I have figured it out. Thanks, Jamir --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group,

[fluent-nhib] Re: Auto Mapper Enum Types

2009-02-26 Thread zhibin
> Also although I now have: > > convention.AddTypeConvention(new MyEnumToIntConvention()); > > in my auto mapping configuration my "AlterMap" method is never called > for my enum types. > > I can see that the "FindConvetions" method in Conventions.cs line 80 > does return my custom convention but

[fluent-nhib] Re: Mapping a SqlTimeStamp and generating a schema for it...

2009-02-26 Thread Paul Batum
Any idea whether the xml that FNH is generating is correct? Are you able to figure out the XML to pass to the schema generator that will correctly create your column? If so we could compare that to what FNH is generating. Paul Batum On Fri, Feb 27, 2009 at 4:53 AM, Steven Harman wrote: > Let's s

[fluent-nhib] Re: Auto Mapper Enum Types

2009-02-26 Thread Andrew Stewart
Hi James Thats my fault when I first wrote the automapper I didn't know that nhibernate could map enums so i turned it off as I had a bunch of enums in my code i didnt want mapped. Seems my inexperience with nhibernate in regards to enums, forced me into that mistake. Sorry guys. Andy On Wed, Fe

[fluent-nhib] Re: Auto Mapper Enum Types

2009-02-26 Thread BringerOD
Does anyone have a Fluent example of how to implement the type-safe enum pattern. On Feb 18, 9:25 am, James Gregory wrote: > I can see your point, but I think you're overselling the problem. Creating a > really long enum name would fail with a truncation error the first time > anyone tried to sa

[fluent-nhib] HasMany IUserType Implementation

2009-02-26 Thread Erik Lundby
Where TypeUserType is an Implementation of IUserType for Type T And TypeCollection is An IList and TypeProperty is property of type T. The following works Map(p => p.TypeProperty).CustomTypeIs(typeof (TypeUserType)); What is the correct way to Map A collection using the IUserType? IHa

[fluent-nhib] AutoMapping with an inherited class duplicates component mapping

2009-02-26 Thread Martin
Hi, I am using auto mapping and have come across a case where I have an inherited class which correctly maps as a joined subclass for the most part ... But the base class has a property which is marked as a component In the joined subclass generated the component is duplicated. Is there anyway I

[fluent-nhib] Mapping a SqlTimeStamp and generating a schema for it...

2009-02-26 Thread Steven Harman
Let's say we have the following class & class mapping: class Idea { public virtual byte[] TS {get;set;} } class IdeaMapping : ClassMap { public IdeaMapping() { Map(x => x.TS).ValueIsAutoNumber().AsReadOnly().CustomSqlTypeIs("timestamp"); } } Given this, nHibernate will re

[fluent-nhib] Re: Inheritance ?

2009-02-26 Thread BringerOD
That was it. Thanks On Feb 26, 8:44 am, Andrew Stewart wrote: > Hi > Yeah, unless someone has upgraded it from my original implementation then > AutoMapping wont be able to do that for you automatically and you'll have to > do it manually. For example: > > .ForTypesThatDeriveFrom< Person >( >  

[fluent-nhib] AutoMapper would like to EagerLoad a single object

2009-02-26 Thread Mark Perry
Hi I am using the automapper and would like to keep the default lazy load on for all but one of the objects where I would like to Eager load for the entire object graph. Is there a way to do this using the auto mapper, or am I going to need to map this object separately using a standard Fluent Ma

[fluent-nhib] Re: IsDirty Flag to Generate connection_string Tag

2009-02-26 Thread David R. Longnecker
Ahh, yeah, protected internal is a much better choice and works like a champ. I've also sent a patch to your email for the basic Oracle configuration. It's not real "feature rich," but contains the formatted connection string and a few options that we commonly set (for connecting to PeopleSoft and

[fluent-nhib] Re: Inheritance ?

2009-02-26 Thread Andrew Stewart
Hi Yeah, unless someone has upgraded it from my original implementation then AutoMapping wont be able to do that for you automatically and you'll have to do it manually. For example: .ForTypesThatDeriveFrom< Person >( map => { map.JoinedS

[fluent-nhib] ForTypesThatDeriveFrom and private fields

2009-02-26 Thread Anders
Hi I'm trying to use the first option specified at http://wiki.fluentnhibernate.org/show/StandardMappingPrivateProperties together with auto mapping and ForTypesThatDeriveFrom. Is this not supported? Sample code: AutoPersistenceModel.MapEntitiesFromAssemblyOf()

[fluent-nhib] Enums as part of Composite Key?

2009-02-26 Thread James Crowley
Hey, I'm getting a "An association from the table [ABC] refers to an unmapped class" error when using an enum as part of a composite key in an entity? When doing UseCompositeId() .WithKeyReference(x => x.SomeOtherKey) Map(x => x.Role, "RoleId"); /* Role is an Enum type */ This works just fi

[fluent-nhib] Re: About Output Mappings!!

2009-02-26 Thread Levin
Thanks,WriteMappingsTo is fine,just you can't check your mappings directly on your VS2008'S output console. On Feb 25, 8:27 pm, James Gregory wrote: > You people certainly output mappings in some weird ways. What's wrong with > just using WriteMappingsTo on the PersistenceModel? > As for the APM

[fluent-nhib] Re: Automapping a complex inheritance

2009-02-26 Thread BringerOD
How do you do that? How do you make that example? On Jan 8, 8:03 am, "Andrew Stewart" wrote: > It seems that the auto mapping of inheritance isn't clever enough to map > that model yet, sorry. You'll have to manually map all descendants of Asset > > Sorry I hadn't spotted that sneaky one. > >

[fluent-nhib] Inheritance ?

2009-02-26 Thread BringerOD
I am having a problem with inheritance. I cannot get the following example to work with the fluent auto mapping. I took the example from the documentation and added one class. Everything I did worked until I added the VipGuest class. How do I get this to work? Can it work? Link to the wiki d