You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your enhancement request related to a problem? Please describe.
When you define a property specifying the state of a table before the transaction and the code does not satisfy this specification, the error reporting does not clarify the problem.
Describe the solution you'd like
Show the state of the asserted property before the transaction and what the assertion was inside of the report.
Additional context
(moduletest G
(defcapG() true)
(defschemafoo-schema
bar:string)
(deftablefoo:{foo-schema})
(defuntest(id:stringvalue:string)
@model [
(property (= (at'bar (read foo id 'before)) "hello"))
]
; (with-read foo id; { 'bar := bar }; (enforce (= bar "hello") "bar must be hello"))
(update foo id
{ 'bar: value })))
(verify'test)
The text was updated successfully, but these errors were encountered:
Hey @rsoeldner I believe checking for a value before modification is not that uncommon if we consider a table to hold a state. For example a order status, where the column holds one of the following values: NEW, IN_PROGRESS, DELIVERED. FV could then enforce the state transition of NEW -> IN_PROGRESS and IN_PROGRESS -> DELIVERED.
Is your enhancement request related to a problem? Please describe.
When you define a property specifying the state of a table before the transaction and the code does not satisfy this specification, the error reporting does not clarify the problem.
Describe the solution you'd like
Show the state of the asserted property before the transaction and what the assertion was inside of the report.
Additional context
The text was updated successfully, but these errors were encountered: