Nhibernate Complex Type binding
Posted
by user329983
on Stack Overflow
See other posts from Stack Overflow
or by user329983
Published on 2010-04-30T18:12:28Z
Indexed on
2010/04/30
19:17 UTC
Read the original article
Hit count: 233
I have two oracle user defined types:
Audit_Type – A normal object with two fields a string and a number
Audit_Table_Type – A table of audit_types, (an array)
I have a stored procedure that takes as a parameter an Audit_Table_Type.
List<Audit_Type> table = new List<Audit_Type>();
var query = session.CreateSQLQuery("call Audit_Rows(Audit_Table_Type(:table))")
.SetParameterList("table", table, NHibernateUtil.Custom(typeof(AuditTypeUDT)))
This is what I did intuativly created the ICompositeType and just set in a list of them in but this gives me nothing close to what I wanted.
I couldn’t figure out how to bind to a table at all.
I have built the inline sql that would do this for me but it would destroy my shared pool (not using binds).
So a General question how do I bind to complex/composite types using Nhibernate?
© Stack Overflow or respective owner