Hi,
I am trying the filter feature.
I declare it in the class definition:
TLabel = class
...
[FilterDef('LanguageFilter', '{LangId} = :LangId')]
[FilterDefParam('LanguageFilter', 'LangId', TypeInfo(int64))]
[Filter('LanguageFilter')]
...
I use RegisterEntity for this class
When I call Enable Filter ('LanguageFilter').SetParam('LangId', 5) I have an acess violation apparently in :
function TMappingExplorer.FindFilterDef(
const FilterName: string): TFilterDefinition;
begin
Result := FFilterDefs.Find(FilterName);
end;
as if FFilterDefs is not assigned
Any hint ?
Regards
Jean-Michel
wlandgraf
(Wagner Landgraf)
March 20, 2021, 9:26pm
2
Your code looks normal, maybe the problem is somewhere else. Are you sure the TMappingExplorer
is created, or was not destroyed? Any steps to reproduce the issue?
wlandgraf
(Wagner Landgraf)
March 21, 2021, 11:59pm
3
We have detected there is an issue indeed here. Next update (to be released very soon, next week) will include the fix.
The current workaround is to explicitly pass the mapping explorer when creating the object manager:
Manager := TObjectManager.Create(Connection, TMappingExplorer.Default);
Many thanks Wagner.
It works, but if I call EnableFilter before an entity was retrieved from the database, I have the message "Filter definition not found"
Since I want to enable the filter right after the manager was created, as a workaround I perform a Manager.Find before calling EnableFilter
wlandgraf
(Wagner Landgraf)
March 22, 2021, 5:53pm
5
Thank you, this will also be fixed.
Both issues fixed with Aurelius 5.1.
Many thanks for this great piece of software !
2 Likes
system
(system)
Closed
March 23, 2021, 1:23pm
7
This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.