LLBLGEN 3.0
Release 8th December
Oracle 9i/10g
I have used expression in code as follows
public static Int64 BillCounterPrepaidCardReCharge()
{
var adaptersmartcatrd = new DataAccessAdapter();
adaptersmartcatrd.StartTransaction(IsolationLevel.ReadCommitted, "BillCounter");
DataTable BillCounterDt = BillCounterPrepaidSmartCardDt();
Int64 BillCounterNo = Convert.ToInt32(BillCounterDt.Rows[0]["BillcounterId"]);
var billcounter = new BillcounterEntity();
adaptersmartcatrd.FetchEntity(billcounter);
billcounter.BillcounterId = BillCounterNo;
billcounter.IsNew = false;
billcounter.Fields[(int) BillcounterFieldIndex.Billnumber].ExpressionToApply =
(BillcounterFields.Billnumber + 1);
adaptersmartcatrd.SaveEntity(billcounter);
adaptersmartcatrd.Commit();
adaptersmartcatrd.Dispose();
}
Problem:
I want to know what is the value that is committed.
If I use refetch after save, it fetches by adding expression once again thus giving incorrect output. I mean let us say DB value is 1, the line
billcounter.Fields[(int) BillcounterFieldIndex.Billnumber].ExpressionToApply =
(BillcounterFields.Billnumber + 1);
will add 1+1 which becomes 2.
Now when I say refetch after save is true, it returns 3 for me. But I need to see the ouput as 2.
How can I achieve this. I cannot write one more fetch entity because another user might have committed another value by that time.