I want to export a schema from my types annotated with NHibernate attributes. Is this possible?
My current code is below, needless to say, it compiles, but the expected table TestType
does not get created.
I have a type as follows:
[Serializable, Class(Schema = "test")]
public class TestType
{
[Property]
public Guid Id { get; set; }
[Property]
public string Value { get; set; }
}
And my export code looks like this:
//...
cfg.AddAssembly(Assembly.Load("My.Assembly"));
new NHibernate.Tool.hbm2dd.SchemaExport(NHibernateConfiguration)
.Execute(false, true, false);
//...