topclaudy / compoships

Multi-columns relationships for Laravel's Eloquent ORM
MIT License
1.1k stars 130 forks source link

Relate two enum types #176

Open xTermy opened 2 months ago

xTermy commented 2 months ago

While trying to get relation BelongsTo which foreign keys are casted to Enum cause this error:

"message": "Object of class CatalogEnum could not be converted to string",
"exception": "Error",
"file": "/var/www/html/vendor/awobaz/compoships/src/Database/Eloquent/Relations/BelongsTo.php",
"line": 240,

Please help me.

phingoc1 commented 1 month ago

Can you show us the model and enum code?