Actually ... just found something else that was impacting this ... the
description below is probably wrong ...
[Property(SqlType = "nvarchar(255), NotNull = true")]
Was just a bit above the code I thought was at fault ... this was
putting SQL in like this:
Title nvarchar(255),
NotNull = true null,
ChartLegend nvarchar(50) null,
So I'll change my question to :
Are SQLType fields not validated in any way? Or am I using the wrong
syntax here?
Cheers
Casey
2008/9/16 [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> After nearly a day wasted trying to find out what was causing this
> error :
>
> TestCase 'Tests.UnitTests.Class1.InitialiseDatabase'
> failed: Castle.ActiveRecord.Framework.ActiveRecordException : Could
> not create the schema
> ----> NHibernate.HibernateException : Incorrect syntax near '='.
> ----> System.Data.SqlClient.SqlException : Incorrect syntax near
> '='.
> at Castle.ActiveRecord.ActiveRecordStarter.CreateSchema() in
>
>
> It turns out the problem was this:
>
> [Property(NotNull = true)]
> public virtual bool Published { get; set; }
>
>
> This compiles just fine, and is the same syntax you would use on any
> property for not null ... just in the case of a bit field it doesn't
> warn, doesn't give a meaningful error, and wastes a day of my time :)
>
> Is this deliberate behaviour? (for non-SQL Server DBs perhaps? or for
> NH compatibility?) Or should it be flagged as a bug?
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---