Open
Description
Fluent NHibernate 1.3 allows to map custom SQL queries in the Component and DynamicComponent mappings 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<Group>
{
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
});
}
}
See also: http://notherdev.blogspot.com/2012/01/mapping-by-code-component-and-odd-cases.html