[nhusers] Re: Property with Oracle´s sequence?

2009-07-01 Thread mhanney
You could map it as an int and set the value explicitly using a sql query. property = (int)session.CreateSQLQuery(SELECT YOUR_SEQUENCE.NEXTVAL FROM DUAL).AddScalar(NEXTVAL, NHibernateUtil.Int32).UniqueResult ()); .. and be sure to use transactions. If you don't want Oracle specific SQL in

[nhusers] Re: Property with Oracle´s sequence?

2009-07-01 Thread Bruno Lima
Thank you Michael for help me. It´s works fine! Better if exists a automatic way to do that on mapping my property. :) About the index column, is only for sorting asc or dec, but respecting the sequence returned values. Thank you again. Bruno. 2009/7/1 mhanney mrh5...@gmail.com You could