[fluent-nhib] Re: question on auto mapping

2009-01-09 Thread James Gregory
:* fluent-nhibernate@googlegroups.com [mailto: > fluent-nhibern...@googlegroups.com] *On Behalf Of *James Gregory > *Sent:* sexta-feira, 9 de Janeiro de 2009 12:14 > > *To:* fluent-nhibernate@googlegroups.com > *Subject:* [fluent-nhib] Re: question on auto mapping > > > &

[fluent-nhib] Re: question on auto mapping

2009-01-09 Thread Luis Abreu
n for your help! --- Luis Abreu From: fluent-nhibernate@googlegroups.com [mailto:fluent-nhibern...@googlegroups.com] On Behalf Of James Gregory Sent: sexta-feira, 9 de Janeiro de 2009 12:14 To: fluent-nhibernate@googlegroups.com Subject: [fluent-nhib] Re: question on auto mapping Andrew

[fluent-nhib] Re: question on auto mapping

2009-01-09 Thread Andrew Stewart
t;> It's because with the AutoMapping, no mappings are actually generated >>> until Configure is called. >>> As for your other issue, I haven't forgotten about it I'm just not near a >>> machine I can debug from. Hopefully tonight or sometime over

[fluent-nhib] Re: question on auto mapping

2009-01-09 Thread James Gregory
can debug from. Hopefully tonight or sometime over the weekend >> I'll get a chance. >> >> >> On Fri, Jan 9, 2009 at 11:45 AM, Luis Abreu wrote: >> >>> Ok, that makes sense. >>> >>> >>> >>> Thanks,. >

[fluent-nhib] Re: question on auto mapping

2009-01-09 Thread Andrew Stewart
gt;> Thanks,. >> >> >> >> --- >> >> Luis Abreu >> >> >> >> *From:* fluent-nhibernate@googlegroups.com [mailto: >> fluent-nhibern...@googlegroups.com] *On Behalf Of *James Gregory >> *Sent:* sexta-feira, 9 de Janeiro de 2009 09:39 >>

[fluent-nhib] Re: question on auto mapping

2009-01-09 Thread James Gregory
t:* sexta-feira, 9 de Janeiro de 2009 09:39 > > *To:* fluent-nhibernate@googlegroups.com > *Subject:* [fluent-nhib] Re: question on auto mapping > > > > You're missing a call to Configure. Before calling > modeloPersistencia.WriteMappingsTo(@"d:\"); call > modeloP

[fluent-nhib] Re: question on auto mapping

2009-01-09 Thread Luis Abreu
s.com] On Behalf Of James Gregory Sent: quinta-feira, 8 de Janeiro de 2009 16:27 To: fluent-nhibernate@googlegroups.com Subject: [fluent-nhib] Re: question on auto mapping Hello Luis, I'm away from a machine with Visual Studio on right now, so I don't know how much help I can be

[fluent-nhib] Re: question on auto mapping

2009-01-09 Thread James Gregory
*From:* fluent-nhibernate@googlegroups.com [mailto: > fluent-nhibern...@googlegroups.com] *On Behalf Of *James Gregory > *Sent:* quinta-feira, 8 de Janeiro de 2009 16:27 > *To:* fluent-nhibernate@googlegroups.com > *Subject:* [fluent-nhib] Re: question on auto mapping > > > >

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Luis Abreu
om: fluent-nhibernate@googlegroups.com [mailto:fluent-nhibern...@googlegroups.com] On Behalf Of James Gregory Sent: quinta-feira, 8 de Janeiro de 2009 16:27 To: fluent-nhibernate@googlegroups.com Subject: [fluent-nhib] Re: question on auto mapping Hello Luis, I'm away from a machine with Visual

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Luis Abreu
Hello James. Thanks for the help! Firstly, why is it that you're using a IUserType for your version? What is the type that your version property has in your entity? I ask that because Fluent NHibernate has a few options for mapping Versions and Timestamps. On the class, I have a Byte[] propert

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Andrew Stewart
Hi James He needs to map it to a timestamp, which is where I get lost as you need to use IUserType to make that work which I have no idea how to use. Thanks for helping, I think you know how that all works better than myself. Andy On Thu, Jan 8, 2009 at 4:27 PM, James Gregory wrote: > Hello Lui

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread James Gregory
Hello Luis, I'm away from a machine with Visual Studio on right now, so I don't know how much help I can be, but lets try to work through your problem. Firstly, why is it that you're using a IUserType for your version? What is the type that your version property has in your entity? I ask that beca

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Luis Abreu
Btw, one more stupid question. If I have this: var modeloPersistencia = AutoPersistenceModel.MapEntitiesFromAssemblyOf() .Where( type => type == typeof (Disciplina) ) //comecar com disciplina .WithConvention(convention =>

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Luis Abreu
Ahh, that makes sense now my fault on the understanding. In that case your only option is to manually map the Version for each class.  I see...can you give more info on how to do that? I mean, should I add classmaap derived classes with only the version definition and then merge them with my au

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Andrew Stewart
Hi Luis Ahh, that makes sense now my fault on the understanding. In that case your only option is to manually map the Version for each class. If you have time though and we're always willing to except a patch for the problem, you would need to ammend the AutoMapVersion class. Cheers Andy On Thu,

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Luis Abreu
Hello again. One quick thing, it seems at the moment, the property that timestamps must be called version or timestamp, otherwise you'll have to manually map it. I tried using Timestamp but then NH tries to use datetime. That's why I'm using a custom user type and it seems like it's working (at

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Andrew Stewart
because on the db the >> version column is of type timestamp) >> >> >> >> >> >> Thanks. >> >> --- >> >> Luis Abreu >> >> >> >> *From:* fluent-nhibernate@googlegroups.com [mailto: >> fluent-nhibern...@go

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Andrew Stewart
ent:* quinta-feira, 8 de Janeiro de 2009 14:00 > *To:* fluent-nhibernate@googlegroups.com > *Subject:* [fluent-nhib] Re: question on auto mapping > > > > Hi Luis > > > > you need to inform automapper that your base type is EntidadeBase rather > than object,

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Luis Abreu
. --- Luis Abreu From: fluent-nhibernate@googlegroups.com [mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Andrew Stewart Sent: quinta-feira, 8 de Janeiro de 2009 14:00 To: fluent-nhibernate@googlegroups.com Subject: [fluent-nhib] Re: question on auto mapping Hi Luis you need to inform

[fluent-nhib] Re: question on auto mapping

2009-01-08 Thread Andrew Stewart
Hi Luis you need to inform automapper that your base type is EntidadeBase rather than object, something similar to below should do the job. var autoMapper = AutoPersistenceModel .MapEntitiesFromAssemblyOf() .Where(t => t.Namespace == "FluentNHibern