[fluent-nhib] Re: AutoMappings strings always nvarchar(255)

2009-03-05 Thread Martin Nilsson
Fluent On Thu, Mar 5, 2009 at 4:05 PM, ComradeF wrote: > > That's odd... shouldn't r368 contain the fix, then? WithLengthOf() > doesn't have any affect on my field definitions. > > Martin, what sort of mapping configuration were you using? Fluent or > Auto? I'm using Auto... > > > On Mar 5, 12:2

[fluent-nhib] DiscriminateSubClasses question

2009-03-05 Thread Roger Heim
Hi All, I've just started using FNH and NHibernate. Between FNH and Steve Bohlen's Summer of NHibernate videos I think I'm starting to get my brain wrapped around this stuff but I have a question about using discriminators and sub-classes. I have an entity that implements a General Ledger accoun

[fluent-nhib] Re: Is the References function broken?

2009-03-05 Thread aemami
Nevermind :) It was actually a mismatch between my datatype (an UInt32 in my code) and the fact that that column was SIGNED in the database) Pretty frustrating error ... On Mar 5, 5:56 pm, James Gregory wrote: > No it's not broken, somebody else would've noticed by now and our tests are > pr

[fluent-nhib] Re: Is the References function broken?

2009-03-05 Thread James Gregory
No it's not broken, somebody else would've noticed by now and our tests are pretty comprehensive. Can you show me the code you're using to A) create your entities, and B) save your entities. Your mappings look ok. On Fri, Mar 6, 2009 at 12:46 AM, aemami wrote: > > Cause it's just not working for

[fluent-nhib] Is the References function broken?

2009-03-05 Thread aemami
Cause it's just not working for me: Here are 2 simple classes: public class MapLocation { public MapLocation() { MapFreeOrPaid = "Free"; MapLevelRestriction = 1; InternalIniName = string.Empty; } #region Properties

[fluent-nhib] Re: Automapping class to point to the same table twice

2009-03-05 Thread James Gregory
You'll need to do an override and explicitly set those two relationships to be many to many's. Off the top of my head, use the ForTypesThatDeriveFrom method with City, and call HasManyToMany for both PersonWorks and PersonBirths. You may need to play around with the parameters, possibly explicitly

[fluent-nhib] Re: Fluent Configuration

2009-03-05 Thread Craig van Nieuwkerk
Thanks, I worked it out. It turns out one of the properties in the entity class was not marked as virtual. Craig. On Fri, Mar 6, 2009 at 10:34 AM, James Gregory wrote: > There should be an inner exception in the FluentConfigurationException, > what's it say? > > On Thu, Mar 5, 2009 at 10:28 PM,

[fluent-nhib] Re: Fluent Configuration

2009-03-05 Thread James Gregory
There should be an inner exception in the FluentConfigurationException, what's it say? On Thu, Mar 5, 2009 at 10:28 PM, Craig van Nieuwkerk wrote: > > I am trying to configure fluent nHibernate and have this code > >Assembly mappingAssembly = > Assembly.ReflectionOnlyLoadFrom("Lib

[fluent-nhib] Fluent Configuration

2009-03-05 Thread Craig van Nieuwkerk
I am trying to configure fluent nHibernate and have this code                Assembly mappingAssembly = Assembly.ReflectionOnlyLoadFrom("LibrarySample.Model.dll");                sessionFactory = Fluently.Configure()                  .Database(MsSqlConfiguration.MsSql2005                    .Con

[fluent-nhib] Re: Automapping class to point to the same table twice

2009-03-05 Thread Miha Necak
Noboy faced an issue like this? I walked through the code and documentation again, but that went nowhere. On 4 mar., 01:11, Miha Necak wrote: > I've noticed that GetForeignKeyName is of type PropertyInfo while > GetForeignKeyNameOfParent is of type System.Type. From that i gather, > i won't be a

[fluent-nhib] Re: Composite reference keys always doing lazy loading

2009-03-05 Thread James Gregory
There's a Not property that's used to invert a call. So you can do LazyLoad() or Not.LazyLoad(), same with any other bool settings too. I'll look at sorting this as soon as I can. On 3/5/09, Kevin Miller wrote: > Ah ok. I was making my assumption that lazy loading was by default false > based o

[fluent-nhib] Re: AutoMappings strings always nvarchar(255)

2009-03-05 Thread ComradeF
That's odd... shouldn't r368 contain the fix, then? WithLengthOf() doesn't have any affect on my field definitions. Martin, what sort of mapping configuration were you using? Fluent or Auto? I'm using Auto... On Mar 5, 12:28 am, Martin Nilsson wrote: > Without checking if it was fixed after yo

[fluent-nhib] Re: Composite reference keys always doing lazy loading

2009-03-05 Thread Kevin Miller
Ah ok. I was making my assumption that lazy loading was by default false based on seeing only a LazyLoad() method that did not seem to take a boolean parameter. This made me think that tacking LazyLoad() onto the end of the method chain would enable lazy loading. Bad assumption I guess and I should

[fluent-nhib] Re: Composite reference keys always doing lazy loading

2009-03-05 Thread James Gregory
I believe lazy is actually true by default. Either way, they Lazy methods are required because you can override the default in conventions, so someone could set it to true (or false) and need the inverse method to their setting. On Thu, Mar 5, 2009 at 4:02 AM, KevM wrote: > > James, > > Yes the