From weppy to Emmett #474
-
Migrating a Weppy app to Emmett (2.5.4) happens that in the following consultation all virtual fields (rowattr and rowmethod) do not work
tramite is a rowattr when query is directly on the object if it works fine, for example:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
@josejachuf in Emmett virtual fields are applied only on "concrete" records, which means only for cases where you select all the fields of a table. This is due to the fact the ORM can't guess in advance which fields are required in the record to make virtual ones working. |
Beta Was this translation helpful? Give feedback.
-
I found that if I do not give the fields as the select argument it works fine This works fine
This not works:
|
Beta Was this translation helpful? Give feedback.
-
Thanks @gi0baro When I do the select of all the fields in the Shell it works, but when I am running it gives me this mistake.
If I enter the fields, the Virtual Fields does not work and if I put all I get error with the JSON Any ideas? |
Beta Was this translation helpful? Give feedback.
-
The problem is in the distinct with the JSON fields. The error happens if I run directly on the PostgreSql console |
Beta Was this translation helpful? Give feedback.
@josejachuf in Emmett virtual fields are applied only on "concrete" records, which means only for cases where you select all the fields of a table.
This is due to the fact the ORM can't guess in advance which fields are required in the record to make virtual ones working.