我已经放了一个Inverse,以防止在函数上插入NHibernate(INSERT INTO dbo.GetMovieTranslation(...))
但它也没有做我的自定义SqlInsert。如何在另一个表上放置自定义插入/更新/删除?
.Override<Movie>(x =>
{
x.Join(
table: "dbo.GetMovieTranslation(:lf.LanguageCode)",
action: j =>
{
j.Inverse();
j.Fetch.Join();
j.KeyColumn("MovieId");
j.Map(f => f.MovieName, "MovieName");
j.Map(f => f.MovieDescription, "MovieDescription");
j.SqlInsert(@"INSERT INTO Movie_Translation
(MovieName,MovieDescription,MovieId,LanguageCode)
values(?,?,?,:lf.LanguageCode)").Check.None();
});
})
)