AV's using Master Detail list

Hi Wagner,

I'm having Access Violations when trying to update a class that has a detail list.  It looks like the RTTI can't figure out what the class is in function.TObjectManager.TManyValuedAssociationProxyController.LoadProxyValue: TObject;

FManagedContainer just has a pointer rather than a classname.  Any ideas?

Here's what I get in the local variables window when I step into it, the class should be TVehicle
Name Value
Self (())
Clazz TClass($1523510)
MemberName 'FHauliers'
Result nil
RttiType ()

Hi Steve, what do you mean by "update a class"? What kind of operation are you doing when you get this error?

I have a TVehicle class which has some detail classes attached to an Aurelius dataset.  The Aurelius dataset is connected to a AdvDBGrid with a separate form to edit them.  The form shows the vehicle and has some more AdvDBGrid's to show the detail records (more aurelius datasets connected to the vehicles' dataset's dataset fields).  If I make a update a record in the form and post it it save fine to the database but when I move off this record in the grid and then back to it I get the access violation.


The detail classes are attached to the TVehicle entity as below
    [ManyValuedAssociation([TAssociationProp.Lazy], CascadeTypeAllRemoveOrphan , 'FVehicle')]
    FAccounts: Proxy<TList<TVehiclesPPDAccount>>;

constructor TVehicle.Create;
begin
  inherited;
  ....
  FAccounts.SetInitialValue(TList<TVehiclesPPDAccount>.Create);

destructor TVehicle.Destroy;
begin
  ....
  FAccounts.DestroyValue;



Hi Steve, 

Do you use Aurelius 2.5 or 2.6?
The situation sounds somewhat similar as I have faced with new version.

After reading your post yesterday I downgraded to version 2.5 as I thought the sounded similar too but it didn't help.  I'm also getting similar problems to you when I try to load field definitions into the dataset but as I can work round that it wasn't so much of a problem for me.


Sometimes I get this other times I get an AV
---------------------------
Error
---------------------------
Cannot find mapping [Id] on class TTrailer..
---------------------------
OK   Details >>   
---------------------------

[23F1C2F0]{aureliusxe2.bpl} Aurelius.Mapping.Explorer.TMappingExplorer.GetId + $20
[23F1C310]{aureliusxe2.bpl} Aurelius.Mapping.Explorer.TMappingExplorer.GetIdColumns + $4
[23EE6819]{aureliusxe2.bpl} Aurelius.Mapping.Attributestrategy.TMappingAttributeStrategy.GetJoinColumnsFromMember + $D9
[23EE6FD2]{aureliusxe2.bpl} Aurelius.Mapping.Attributestrategy.TMappingAttributeStrategy.LoadColumnsFromMember + $1D6
[23F1B739]{aureliusxe2.bpl} Aurelius.Mapping.Explorer.TMappingExplorer.GetColumnsFromMember + $C9
[23E7177B]{aureliusxe2.bpl} Aurelius.Mapping.Optimization.TRttiOptimization + $3B
[23EE6D46]{aureliusxe2.bpl} Aurelius.Mapping.Attributestrategy.TMappingAttributeStrategy.LoadAssociationByMember + $15E
[23F1A3EB]{aureliusxe2.bpl} Aurelius.Mapping.Explorer.TMappingExplorer.GetAssociationByMember + $9F
[23F1A6B9]{aureliusxe2.bpl} Aurelius.Mapping.Explorer.TMappingExplorer.GetAssociations + $E9
[23F19D85]{aureliusxe2.bpl} Aurelius.Mapping.Explorer.TMappingExplorer.FindAssociationByPropertyName + $31
[23F1FDBF]{aureliusxe2.bpl} Aurelius.Mapping.Explorer.TMappingExplorer.DefaultInstance + $F
[23F9BD85]{aureliusxe2.bpl} Aurelius.Bind.Dataset.TBaseAureliusDataset.InitFieldDefsFromClass + $F5
[220B459F]{dclaureliusxe2.bpl} Aurelius.Design.Datasetdesigner.TfmFieldLoader.btOkClick + $3B
[50332EEB]{vcl160.bpl  } Vcl.Controls.TControl.Click (Line 7320, "Vcl.Controls.pas" + 9) + $8




We are able to reproduce Hannu's problem (actually with the project he sent) and we are going to fix that. Please send me a private e-mail so when it's fixed I can send you both a patch.

Steve, if it doesn't solve your problem, then please try to build a project that reproduces the problem and send it to me, preferably with native SQLite. But let's hope the issues are related.

We have fixed this issue and sent the patches to the private e-mail of both of you. Merry Christmas.