[fluent-nhib] Re: Conditional Fluent Mappings with SqlLite and Sql Server

2009-04-27 Thread Action Jackson
Worked like a charm. Brilliance... On Apr 28, 12:01 am, Hudson Akridge wrote: > Hrm, try something like this: > Map(x => x.FileData) >      .WithLengthOf(2147483647); > > I believe that should be the max size for varbinaries. > > > > On Mon, Apr 27, 2009 at 11:35 PM, Action Jackson wrote: > > >

[fluent-nhib] Re: Conditional Fluent Mappings with SqlLite and Sql Server

2009-04-27 Thread Hudson Akridge
Hrm, try something like this: Map(x => x.FileData) .WithLengthOf(2147483647); I believe that should be the max size for varbinaries. On Mon, Apr 27, 2009 at 11:35 PM, Action Jackson wrote: > > Thanks! Removing the explicit call to CustomSqlTypeIs and adding the > explicit dialects for eac

[fluent-nhib] Re: Conditional Fluent Mappings with SqlLite and Sql Server

2009-04-27 Thread Action Jackson
Thanks! Removing the explicit call to CustomSqlTypeIs and adding the explicit dialects for each back end seemed to make the difference. Thank you very much for your help. Not to be greedy, but would you happen to know if it's possible to change the default mapping of byte [] properties for MsSq

[fluent-nhib] Re: Conditional Fluent Mappings with SqlLite and Sql Server

2009-04-27 Thread Hudson Akridge
> > are you saying that I should remove the explicit call to "CustomSqlTypeIs" > and let NHibernate automatically take care of the conditional logic for what > the Sql type should be? > Yup :) This is the exact reason that dialects exist. Dialects are a way to work with a database consistently, co

[fluent-nhib] Re: Conditional Fluent Mappings with SqlLite and Sql Server

2009-04-27 Thread Action Jackson
Hi Hudson, thank you for the quick response. FileData is a byte array (byte[]). As for my database configuration, I am using the SqlLite20Driver and the SQLiteDialect for testing purposes. For your #1 suggestion, are you saying that I should remove the explicit call to "CustomSqlTypeIs" and le

[fluent-nhib] Re: Conditional Fluent Mappings with SqlLite and Sql Server

2009-04-27 Thread Hudson Akridge
1.) What is your FileData? Assuming it's marked as serializable, NHibernate should default to mapping it to a BLOB or varbinary depending on the dialect used during configuration. You then set the different dialects during different initialization routines depending on if you're testing or running