'Minus flag on list filter
Working on some code and saw this:
<#list entity.fields(f- !f.isPrimaryKey) as field>
I know it is some kind of filter but I don't understand the f- flag. Looking on the documentation I did not see anything regarding that.
Solution 1:[1]
Ignoring the typo, you can use lambda
The usage of lambdas is restricted to the parameters of certain built-ins, like: filter, map, take_while, drop_while.
For example as @ddekany comment
<#list entity.fields?filter(f -> !f.primaryKey) as field>
Where you are filtering fields list with non primary keys
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user7294900 |
