I am trying to validate the schema, but I am using Castle ActiveRecord.

I wrote this (I don't know if it's correct):

--
ISessionFactoryHolder holder = ActiveRecordMediator.GetSessionFactoryHolder();
SchemaValidator schemaValidator =
        new 
SchemaValidator(holder.GetConfiguration(holder.GetRootType(typeof(MyClass))));
                        
schemaValidator.Validate();
--

When I run the program it throws this exception:

Unhandled Exception: System.NotSupportedException: Operation is not supported.
  at NHibernate.Dialect.Dialect.GetDataBaseSchema 
(System.Data.Common.DbConnection connection) [0x00000] 
  at NHibernate.Tool.hbm2ddl.DatabaseMetadata..ctor 
(System.Data.Common.DbConnection connection, NHibernate.Dialect.Dialect 
dialect, Boolean extras) [0x00000] 
  at NHibernate.Tool.hbm2ddl.SchemaValidator.Validate () [0x00000] 

I am using Mono 2.4.2 and Ubuntu Linux.

Any ideas? Thanks!

El mié, 25-11-2009 a las 10:43 +0200, Ayende Rahien escribió:
> new SchemaValidator(configuration).Validate()
> 
> On Wed, Nov 25, 2009 at 5:05 AM, rith <[email protected]> wrote:
>         Dear all,
>         
>         I want to check Schema whether or not it created.
>         How can I check?
>         
>         Thanks,
>         
>         --
>         
>         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.
>         
>         
> 
> 
> --
> 
> 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 castle-project-users
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.


-- 
Milton Pividori
Blog: http://www.miltonpividori.com.ar
Jabber ID: [email protected]
GnuPG Public Key: gpg --keyserver subkeys.pgp.net --recv-key 0x663C185C

--

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.


Reply via email to