eloquence icon indicating copy to clipboard operation
eloquence copied to clipboard

ValidableContract, CleansAttributes fails save when used inside job.

Open olivernybroe opened this issue 8 years ago • 3 comments

I have been stuck on this annoying bug in a long time and finally realised it was caused by validable.

The problem is when trying to create an model inside a job the eloquence Hookable save() returns false.

If I however set skipValidation = true then it passes the save, but saves an empty model, because CleansAttributes just removes everything. If I however removes the implementation of CleansAttributes and has skipValidation = true, then I saves the model as intended.

Running Laravel 5.2

olivernybroe avatar Feb 11 '17 11:02 olivernybroe

I have the same problem. If CleansAttributes interface is used, then nothing is saved on model. It's just empty. Using Laravel 5.3

dikos avatar Mar 24 '17 16:03 dikos

What was exactly the problem here?

jarektkaczyk avatar Apr 22 '17 14:04 jarektkaczyk

As said in the bug description, When creating a model inside a job, then the save function fails.

It looks like a bug with CleansAttributes.

olivernybroe avatar Apr 22 '17 19:04 olivernybroe