Hi again
I have made good progress with both my project file and my code using the new generated code in version 4.2.
There might be a stack of errors down the track, but currently I only have one problem occurring over 6 errors.
Cannot access protected member 'SD.LLBLGen.Pro.ORMSupportClasses.EntityCore<SD.LLBLGen.Pro.ORMSupportClasses.IEntityFields>.Transaction' via a qualifier of type 'sevenG.BusinessLogic.EntityClasses.AccountEntity'; the qualifier must be of type 'sevenG.BusinessLogic.EntityClasses.BizTransactionEntity' (or derived from it)
It happens when I reference the entity's Transaction property. For the two entities involved I can access it in dozens of other places, but for some reason not in 6 places. Or maybe it is the way I reference it in those 6 places, I am not sure.
The code looks like this, I have not passed in the whole method:
private void rollbackBizEvent(int userID, BizEventEntity bizEvent, BizTransactionEntity bizTxn, ref List<long> rolledBackBizEventIDs)
{
Transaction dbtxn = (Transaction)bizEvent.Transaction;
BizEventCollection bizEvents = new BizEventCollection();
ISortExpression bizEventsSorter = new SortExpression();
bizEventsSorter.Add(BizEventFields.BizEventID | SortOperator.Descending);
IPredicateExpression filterBizEvents = new PredicateExpression();
filterBizEvents.Add(BizEventFields.BizTransactionBatchID == this.BizTransactionBatchID);
filterBizEvents.AddWithAnd(BizEventFields.ParentBizEventID == bizEvent.BizEventID);
dbtxn.Add(bizEvents);
bizEvents.GetMulti(filterBizEvents, 0, bizEventsSorter);
This code is in production and works perfectly when I generate the code from version 2.6. So the problem is from something that has been introduced in later versions.
I have trawled through lots of documentation and googled this for hours so I think I have to give up and turn to you guys. Can you shed any light on the subject?
You may need more info to be able help out, I realise that, but rather than sending in tonnes of stuff I kept it small thinking it is better if you ask for what you need.
Regards
Rob
Attachments
Filename |
File size |
Added on |
Approval |
Error.jpg
|
190,721 |
30-Dec-2014 08:41.33 |
Approved |