You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This resolves the issue insofar as the values entered into the path column are now valid (e.g. 00ed4884_4c16_4ea9_97b0_0354fd5877c2 instead of 00ed4884-4c16-4ea9-97b0-0354fd5877c2)
However it then isn't possible to retrieve the record as it doesn't then know what this value relates to.
I'm wondering if special handling is required for UUID primary keys to deal with this?
Ought to be possible in the has_ltree_hierarchy method to check the type of the primary key in base.columns
e.g. is_uuid = base.columns.first.sql_type_metadata.type == :uuid
Then automatically translate the values to be ltree-safe on input, and reverse the operation on output.
The text was updated successfully, but these errors were encountered:
Currently this gem is incompatible with UUID primary keys. This is because postgres does not allow hyphens in
lpath
values.I've tried overriding
ltree_fragment_column
to try and sanitize the UUID value to something postgres will accept:This resolves the issue insofar as the values entered into the
path
column are now valid (e.g.00ed4884_4c16_4ea9_97b0_0354fd5877c2
instead of00ed4884-4c16-4ea9-97b0-0354fd5877c2
)However it then isn't possible to retrieve the record as it doesn't then know what this value relates to.
I'm wondering if special handling is required for UUID primary keys to deal with this?
Ought to be possible in the
has_ltree_hierarchy
method to check the type of the primary key inbase.columns
e.g.
is_uuid = base.columns.first.sql_type_metadata.type == :uuid
Then automatically translate the values to be ltree-safe on input, and reverse the operation on output.
The text was updated successfully, but these errors were encountered: