nhibernate - LocalDB: transaction deadlock in unit tests? -
i'm using localdb database checking if mappings working ok (i'm using nhibernate+fluent nhibernate). now, have complex structure, items shared between several "aggregates". i've configure aggregates collections aren't loaded lazily , i've started getting transaction locks on 1 of unit tests. now, if run same code against sql server, works out correctly. know if there major differences between these 2 versions regarding locking?
btw, mapping tests wrapped in transactions rolled automatically @ end of tests. here's example of 1 of tests i'm trying execute:
using (var session = gestorligacoes.fabricasessoes.opensession()) { using (var tran = session.begintransaction()) { var area = area.nova(new novaarea(new acao("luis.abreu"), "teste", "area de testes")); session.save(area); session.flush(); var secretaria = new secretaria("secretaria", "sec", new acao("luis.abreu")); secretaria.adicionaarea(new adicionaarea(new acao("luis.abreu"), secretaria.versao, area)); new persistencespecification<secretaria>(session) .verifythemappings(secretaria); tran.rollback(); } }
thanks.
regards, luis
Comments
Post a Comment