[fluent-nhib] Re: mapping a function of a property

2009-05-08 Thread tekito
Okay thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com To unsubscribe from this group, send email to fluent-n

[fluent-nhib] Re: mapping a function of a property

2009-05-08 Thread Hudson Akridge
Your second way is the way to go as far as I know. You can also map that with the ReadOnlyAccessor and save yourself from having to define an empty settter or some other similar workaround. On Fri, May 8, 2009 at 3:05 PM, tekito wrote: > > Is it possible to map a property to the database using a

[fluent-nhib] mapping a function of a property

2009-05-08 Thread tekito
Is it possible to map a property to the database using a function instead of its actual value? For example, if I wanted to save a stored integer ID as ID+1? Or should I create a separate property that returns this value and map to that instead? --~--~-~--~~~---~--~---

[fluent-nhib] Re: error running tutorial

2009-05-08 Thread Stuart Childs
That's an NHibernate error thrown when the mapping file is incorrect. Add a .ExportTo("Directory path here") after AddFromAssemblyOf to get FNH to write out all the mapping files it is passing to NHibernate. If you are familiar with NHibernate HBM files, you might see the problem or you could post

[fluent-nhib] error running tutorial

2009-05-08 Thread tekito
I am working my way through the tutorial and getting an early error. Details below. When running the console displays this: id property property many-to-one id property bag bag then the program stops at this command (this is in vb): Return Fluently.Configure.Database( _ SQLiteConfi

[fluent-nhib] Re: How can I map a nullable enum?

2009-05-08 Thread Hudson Akridge
This is a reported issue at the moment: http://code.google.com/p/fluent-nhibernate/issues/detail?id=168&q=enum There's a convention as a patch which supposedly gets around it, although I haven't tested personally. You may also find more info in the following bug report (which was flagged as fixed):

[fluent-nhib] How can I map a nullable enum?

2009-05-08 Thread Jamie Ide
I have been unable to persist a nullable enum using NHibernate with Fluent NHibernate configuration. NHibernate attempts to save a string representation of the enum and I get the error System.Data.SqlClient.SqlException: Conversion failed when converting the nvarchar value 'VGS' to data type ti

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

2009-05-08 Thread James Gregory
Reverted. You should be able to use the string overload again. 2009/5/6 robsosno > > I've already explained this: CustomSqlTypeIs(string) is not an option - > it works for single database type only, and I have two databases: for > unit tests and production one. > I see solution for the case: Cus