Hi Rob,
I have problems updating a record on Oracle: I think the problem is optimistic concurrency checking with all columns.
Inserting the record all works:
trans[1003], 13:25:33.207, insert into CISE_DICHIARAZIONE (id, protocollo_inps, data_presentazione, codfis_dichiarante, ise, isee) values (?, ?, ?, ?, ?, ?)
trans[1003], 13:25:33.207, Binding Insert [CISE_DICHIARAZIONE] set[id=12, protocolloInps=aaaa, dataPresentazione=null, codfisDichiarante=, ise=null, isee=null, ]
trans[1003], 13:25:33.223, Inserted [verificheise.model.Dichiarazione] [12]
If i try to update i have an error: Data has changed. updated [0] rows
trans[1004], 13:25:38.457, update CISE_DICHIARAZIONE set protocollo_inps=?, data_presentazione=?, codfis_dichiarante=?, ise=?, isee=? where id=? and protocollo_inps=? and data_presentazione is null and codfis_dichiarante=? and ise is null and isee is null
trans[1004], 13:25:38.457, Binding Update [CISE_DICHIARAZIONE] set[protocolloInps=aaaa, dataPresentazione=null, codfisDichiarante=a, ise=null, isee=null, ] where[id=12, protocolloInps=aaaa, dataPresentazione=null, codfisDichiarante=, ise=null, isee=null, ]
I think the problem is using the empty string instead of null for selecting the row: ... where ....codfisDichiarante=... because Oracle treats the empty string ('') as null and so no row is selected.
Am I doing something wrong?
Thanks
Claudio