kirkbushell / eloquence

A drop-in library for certain database functionality in Laravel, that allows for extra features that may never make it into the main project.
MIT License
537 stars 60 forks source link

CamelCasing does not work on updateOrCreate method #110

Closed aldrengadon closed 5 months ago

aldrengadon commented 8 months ago

Got this error when I tried to update a table using update and updateOrCreate functions with hasOne relationship. image

create and createMany functions are working fine though.

aldrengadon commented 8 months ago

Sorry for the confusion, CamelCasing works fine.

aldrengadon commented 6 months ago

Reopening this again as, updateOrCreate method is not working.

Got this error: image

create, createMany and update methods are working fine.

kirkbushell commented 5 months ago

@aldrengadon in that case you have to use snake_case, as it bypasses the model's configuration - you're basically working directly with database columns.