B
blabla120
Hi folks,
I am net to NHibernate, and I hava a read baisc/general question.
In my database (PostgreSQL), I have an unique index laying on the field
transaktionsnummer which is located in the table payment.
I use the Find-Method of the Session class to query some objects:
ArrayList find = (ArrayList)Program.Session.Find("from payment where
transaktionsnummer = ? ", transaktionsnummer, NHibernateUtil.Int32);
What now happens amazes me : I get an Db-Exception "duplicate key
violates unique constraint uind_transaktionsnummer"
So my general question is: the Find-Method should be Read-Only,
shouldn't it? How can a querying function trhow a uniqe constraint
exception? It isn't supposed to write someting, or am I completely
wrong?
thanks for any Hints,
Bernd
I am net to NHibernate, and I hava a read baisc/general question.
In my database (PostgreSQL), I have an unique index laying on the field
transaktionsnummer which is located in the table payment.
I use the Find-Method of the Session class to query some objects:
ArrayList find = (ArrayList)Program.Session.Find("from payment where
transaktionsnummer = ? ", transaktionsnummer, NHibernateUtil.Int32);
What now happens amazes me : I get an Db-Exception "duplicate key
violates unique constraint uind_transaktionsnummer"
So my general question is: the Find-Method should be Read-Only,
shouldn't it? How can a querying function trhow a uniqe constraint
exception? It isn't supposed to write someting, or am I completely
wrong?
thanks for any Hints,
Bernd