Possible bugs
Posted: Wed 30 Dec 2015 13:55
Hello,
In this post, we will post same possible other bugs:
1) Getting the list from a reference table:
When you have created a assosciation between to objects(tables) and the new Entity is created with the Context.CreateEntity<TEntity> function, a acces violation is throwed when you call a property of function from the Referencedata.(The asscoscation table RelatieAdres is exists and not nil).
Create the new entity:
![Image](http://i68.tinypic.com/2ccmixy.png)
Load the assosciation table:
![Image](http://i63.tinypic.com/21lqr8p.png)
This throw the acces violation now:
![Image](http://i63.tinypic.com/35kki38.png)
When you create the new entity with the Context.CreateAttachedEntity, you can get the assosciation table without problems.
2) Getting data from a reference table property(When the assosciation is OneToOne):
When you call a entity with a assosciation table for the first time with a linq query, it's works fine:
The entity is TMove. the assosciation table is Container.
Move.Container.property
The variable 'aMoveID' is 4 (primary key).
We can call the assosciation table and his property with succes:
![Image](http://i68.tinypic.com/2sakocp.png)
When you call the same function with a another ID, a Delphi Exception(EAssertionFalid) is throwed.
The variable 'aMoveID' is 3 (primary key).
![Image](http://i63.tinypic.com/118poaw.png)
Table view:
![Image](http://i66.tinypic.com/sboglk.png)
The problem is maybe that are two records with a container ID with '1'.
3) RTTI:
When you use the RTTI functions like GetPropInfo(Entity.ClassInfo, 'PropName'), you get always a nil pointer.
In this post, we will post same possible other bugs:
1) Getting the list from a reference table:
When you have created a assosciation between to objects(tables) and the new Entity is created with the Context.CreateEntity<TEntity> function, a acces violation is throwed when you call a property of function from the Referencedata.(The asscoscation table RelatieAdres is exists and not nil).
Create the new entity:
![Image](http://i68.tinypic.com/2ccmixy.png)
Load the assosciation table:
![Image](http://i63.tinypic.com/21lqr8p.png)
This throw the acces violation now:
![Image](http://i63.tinypic.com/35kki38.png)
When you create the new entity with the Context.CreateAttachedEntity, you can get the assosciation table without problems.
2) Getting data from a reference table property(When the assosciation is OneToOne):
When you call a entity with a assosciation table for the first time with a linq query, it's works fine:
The entity is TMove. the assosciation table is Container.
Move.Container.property
The variable 'aMoveID' is 4 (primary key).
We can call the assosciation table and his property with succes:
![Image](http://i68.tinypic.com/2sakocp.png)
When you call the same function with a another ID, a Delphi Exception(EAssertionFalid) is throwed.
The variable 'aMoveID' is 3 (primary key).
![Image](http://i63.tinypic.com/118poaw.png)
Table view:
![Image](http://i66.tinypic.com/sboglk.png)
The problem is maybe that are two records with a container ID with '1'.
3) RTTI:
When you use the RTTI functions like GetPropInfo(Entity.ClassInfo, 'PropName'), you get always a nil pointer.