on 04-02-2020 6:57 PM
I'm using a virtual field in an entity model, like
entity Products : {
...
virtual margin : Decimal(9, 2)
...
}
When building a draft enabled v4 UI on CAP Node.js with Fiori Elements, I can edit Product details on an object page (margin field is not input enabled). When saving a changed dataset, I'm getting the error "SQLITE_ERROR: no such column: margin".
Obviously, the service provider is constructing an sql-statement including the margin-column, which is not on the database (which is correct). When doing http-POSTs on Products, the error does not show up.
Is there anything to do in addition to work with virtual fields in draft mode?
Here are my cds version coordinates:
@sap/cds: 3.33.1 @sap/cds-compiler: 1.24.4 @sap/cds-dk: 1.7.1 @sap/cds-foss: 1.1.0@ sap/cds-messaging: 1.8.2 @sap/cds-reflect: 2.10.2 @sap/cds-rest: 1.6.2 @sap/cds-services: 1.27.1
Node.js: v12.15.0
Thanks,
Hi Klaus, Thorsten,
with new version of CDS 4+ this problem should be solved.
BR
Samuel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Klaus,
I recently had the same issue.
A workaround (until the issue is resolved) is to use the flag @cds.persistence.exists for the property margin.
Cheers,
Thorsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.