jagregory/fluent-nhibernate — Issue #119: SqlInsert, SqlUpdate, SqlDelete, SqlDeleteAll should not be available in Component mapping
Author: NOtherDev
Created: 2012-01-22 18:22:34+00:00
State: open

Fluent NHibernate 1.3 allows to map custom SQL queries in the Component mapping even if it's not supported by NHibernate. Setting SqlXYZ methods has no effect.

public class Group
{
// ...
public virtual Test Test { get; set; }
}

public class Test
{
public virtual string TestProperty { get; set; }
}

public class GroupMap : ClassMap
{
public GroupMap()
{
Component(x => x.Test, m =>
{
m.SqlInsert("select 1"); // should not be here
m.SqlUpdate("select 1"); // should not be here
m.SqlDelete("select 1"); // should not be here
m.SqlDeleteAll("select 1"); // should not be here
});
}
}