[fluent-nhib] Re: Automapping many to one

2009-05-05 Thread James Gregory
Ricardo: that exception looks very familiar. I committed a fix earlier today that certainly fixed an exception very similar to that, if I were you I'd do an update and double check it isn't already fixed. On Tue, May 5, 2009 at 7:23 PM, Ricardo wrote: > > I believe I am having this same issue.

[fluent-nhib] Re: Automapping many to one

2009-05-05 Thread Ricardo
I believe I am having this same issue. I will post all my info, hoping to help. I'm going to try Kevin's fix for now to see if it works, and if I have time, I'll also attempt to help. I have a Poll that has a list of Answers. If I leave it at that, it works fine. But as soon as I add a many-t

[fluent-nhib] Re: recent breaking change in CustomTypeIs

2009-05-05 Thread James Gregory
It seems like you're asking for more than one thing. Lets straighten the first one out, CustomTypeIs(string) is gone, can you use CustomSqlTypeIs(string) instead? 2009/5/5 robsosno > > I can write CustomSqlTypeIs("Date") or CustomSqlTypeIs("Decimal(16,2)"). > This is correct for my database. > H

[fluent-nhib] Re: recent breaking change in CustomTypeIs

2009-05-05 Thread robsosno
I can write CustomSqlTypeIs("Date") or CustomSqlTypeIs("Decimal(16,2)"). This is correct for my database. However this way I'll break my unit tests which are executed using SQLite in-memory database (CustomSqlTypeIs("DateTime") and CustomSqlTypeIs("Numeric")). I would use rather this: CustomTy

[fluent-nhib] Re: Using Fluent NHibernate’s AutoPe rsistenceModel but with eager loading in a single object

2009-05-05 Thread James Gregory
FYI, answer posted on stackoverflow . On Tue, May 5, 2009 at 5:25 PM, rguerreiro wrote: > > I've forgot to mention that the answer I found was this: > > http://groups.google

[fluent-nhib] Re: Avoiding Mapping Property

2009-05-05 Thread Jose Selesan
Answer to myself: AutoPersistenceModel.MapEntitiesFromAssemblyOf() .ConventionDiscovery.Setup( c => c.Add() ) .ForTypesThatDeriveFrom( t => t.IgnoreProperty( a => a.Age ) ); Thanks Hudson and thanks FluentNHibernate tests! On Tue, May 5, 2009 at 1:47 PM, Jose Seles

[fluent-nhib] Re: Avoiding Mapping Property

2009-05-05 Thread Jose Selesan
Mmmm, I don't undestand (I'm a newbie with FluentNHibernate). Can you provide an example? Thanks On Tue, May 5, 2009 at 1:34 PM, Hudson Akridge wrote: > You can use the "IgnoreProperty" method on the AutoMap class for Age.Or > you can use the IAutoMappingOverride and map that class manually, san

[fluent-nhib] Re: Avoiding Mapping Property

2009-05-05 Thread Hudson Akridge
You can use the "IgnoreProperty" method on the AutoMap class for Age.Or you can use the IAutoMappingOverride and map that class manually, sans Age. On Tue, May 5, 2009 at 11:09 AM, Jose Selesan wrote: > > Hi people. I have a class mapped using AutoPersistenceModel but I want > to avoid mapping s

[fluent-nhib] Re: Using Fluent NHibernate’s AutoPe rsistenceModel but with eager loading in a single object

2009-05-05 Thread rguerreiro
I've forgot to mention that the answer I found was this: http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/6acc362331c93f6f?pli=1 On May 5, 5:21 pm, rguerreiro wrote: > I'm using Fluent NHibernate in order to auto map my entities. > > This is the code I'm using for the auto m

[fluent-nhib] Using Fluent NHibernate’s AutoPersis tenceModel but with eager loading in a single object

2009-05-05 Thread rguerreiro
I'm using Fluent NHibernate in order to auto map my entities. This is the code I'm using for the auto mapping: new AutoPersistenceModel() .AddEntityAssembly(Assembly.GetAssembly(typeof(Entity))) .Where(type => type.Namespace.Contains("Domain") && type.BaseType != null && type.BaseType.Name.S

[fluent-nhib] Avoiding Mapping Property

2009-05-05 Thread Jose Selesan
Hi people. I have a class mapped using AutoPersistenceModel but I want to avoid mapping some properties. For example, my class is like this: public class Teacher { public virtual int Id {get; protected set; } public virtual string Name {get; set; } public virtual DateTime BirthDate { get; s

[fluent-nhib] Re: Mapping Joined Subclass

2009-05-05 Thread HMS
As of revision 482 this bug is resolved. Thanks to James for the quick fix :) On 5 mei, 10:57, HMS wrote: > This is a correct example (sorry for misleading you earlier) of my > problem: > > Entities: > >     public class Foo >     { >         public virtual long Id { get; set; } >         publi

[fluent-nhib] Re: Mapping one-to-one relationship through composite key

2009-05-05 Thread JamesSpibey
Thanks for the reply. Yes, my terminology was incorrect, thanks. I think this same issue exists with the ManyToManyPart.WithChildKeyColumn function - is that correct? On Apr 30, 4:21 pm, Hudson Akridge wrote: > Issue has already been reported > here

[fluent-nhib] Re: Map a Strategy Pattern using Fluent NHibernate

2009-05-05 Thread Paul Batum
If I am understanding your scenario correctly, there is no "mapping". Unless you have actual table(s) for your payment behaviour, this isn't a mapping problem but rather an entity loading problem. There are a number of ways you can approach this. This blog post from Ayende outlines one possibility

[fluent-nhib] no "property-ref" on HasMany... any work arounds?

2009-05-05 Thread James Crowley
Hey, I've just come across the fact that there's no way to specify "property-ref" on a HasMany relation (so I can point the one-to-many to a non-primary key field on the parent entity), as described in this bug report: http://code.google.com/p/fluent-nhibernate/issues/detail?id=207 Just wonderin

[fluent-nhib] Re: Mapping Joined Subclass

2009-05-05 Thread HMS
This is a correct example (sorry for misleading you earlier) of my problem: Entities: public class Foo { public virtual long Id { get; set; } public virtual string Name { get; set; } } public class Bar : Foo { public virtual AnotherFoo otherFoo { get;

[fluent-nhib] Re: Mapping Joined Subclass

2009-05-05 Thread HMS
I noticed my mapping in this small example is incorrect (using references instead of Map) but in my application I am referencing another mapped object. I'll post again with a correct example. On 5 mei, 10:44, HMS wrote: > Hello, > > When trying to map a JoinedSubclass with the latest revision (4

[fluent-nhib] Re: Mapping Joined Subclass

2009-05-05 Thread James Gregory
Investigating now. On Tue, May 5, 2009 at 9:44 AM, HMS wrote: > > Hello, > > When trying to map a JoinedSubclass with the latest revision (481), I > get the following exception: > > Test method > FluentNHibernateBug.Tests.FooMappingTest.FooMappedCorrectly threw > exception: FluentNHibernate.Cfg

[fluent-nhib] Mapping Joined Subclass

2009-05-05 Thread HMS
Hello, When trying to map a JoinedSubclass with the latest revision (481), I get the following exception: Test method FluentNHibernateBug.Tests.FooMappingTest.FooMappedCorrectly threw exception: FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used w

[fluent-nhib] Re: Create Mapping

2009-05-05 Thread James Gregory
Sounds like you're going about things in a round-about why, why aren't you just using Fluent to generate your schema and configure NHibernate? Fluent isn't really aimed at hbm generation, although it is able of doing it. If you want to continue with how you've been doing things, then you should inv

[fluent-nhib] Create Mapping

2009-05-05 Thread Justin Masters
Hi, We've been using Fluent for probably around 6-8 months, and apart from a couple of minor patches we haven't bothered upgrading as it did what we wanted it to do. We use Fluent to generate our HBM files from our domain model, then generate our database generation script from our HBMs. I grab

[fluent-nhib] Re: Sybase Configuration

2009-05-05 Thread shabhana...@gmail.com
thank you. On May 4, 6:20 pm, James Gregory wrote: > Again, this is not a Fluent NHibernate issue, you need to ask this on the > main NHibernate mailing list . > > When I say this is a driver/dialect issue I am referring to the dialect and > driver classe