bouncer icon indicating copy to clipboard operation
bouncer copied to clipboard

Ability Cast Blocks UUID on 'entity_id'

Open SMPEJake opened this issue 1 year ago • 2 comments

Hello! Thanks for the great library!

Just trying to make this work with models that use UUID's, i have updated the entity_id columns on the database tables to the UUID column but there appears to be an issue. There is currently a cast in the Ability Model for entity_id which casts it to int, this cast blocks the UUID's working properly.

Would there be any problems with removing the cast?

SMPEJake avatar Apr 14 '23 15:04 SMPEJake

Seems logical. You should be able to just change the casts in your custom models.

JosephSilber avatar Apr 14 '23 22:04 JosephSilber

I've been using this with uuid based entities (user, team(scope) and entity) for an age, great package.

It works perfectly well, however I did hit a snag with the clipboard with a particularly complex custom scope using an array of UUIDs, can't remember what I did to fix it (from vague memory it was field length), but if you experience an issue then please @ me and I'll try to give you a steer.

@JosephSilber appreciate you've gotten this far without a config file which I'm suitably impressed with. But what would your feelings be on a config option to enable uuids (so the command generates a uuid migration, and switches the model casts to uuid compliant). Not volunteering to do this immediately as I'll need to go back through what I've done and triple check it.

lrljoe avatar Apr 15 '23 17:04 lrljoe