views:

48

answers:

0

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?