Is there anyway to get Lucee with ORM enabled to pick-up sql insert errors
where constraints are the reasons for the fault?
Example:
ORM object called product with field createdBy constrained to userID in
user table.
When I do an insert using orm with createdBy set to an invalid userID. ORM
throws an error “Could not insert: [product]”
However when I run the insert thru cfquery I get the following error.
cannot add or update a child row: a foreign key constraint fails
(database
.product
, CONSTRAINT productCreatedBy
FOREIGN KEY
(createdBy
) REFERENCES user
(userID
))
is there a way to get ORM to throw the same message as cfquery?