Needs review
Project:
Smartling Connector
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Jul 2017 at 00:46 UTC
Updated:
24 Jul 2017 at 14:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
damienmckennaThis reverts the previous changes.
Note: I suspect some custom handling will need to be added for Bean or other entity types that need to allow a non-integer ID. Incidentally, I'm a comaintainer of the Bean module, so we could discuss any changes that are needed for that module.
Comment #3
soul88Hello, Damien.
I'm glad to hear from you.
I have 2 thoughts here:
1. Drupal core allows non-int primary keys for entities (like Bean), so it seems that we would need to support it anyway.
2. As for the Bean module, do you think you potentially could switch to an int field, or what other solution for this issue do you see?
Please let me know your thoughts here, as right now I'm honestly hesitating on what would be the best solution here.
Maybe some source of optional type-casting for PgSQL would be a better option here (not sure).
Comment #4
damienmckennaHello again Kostya :)
1. The problem with non-int primary keys only shows up when you use a database other than MySQL, like PostgreSQL; MySQL isn't very strict when it comes to data comparisons, (IIRC) it'll be slower than a direct int-to-int comparison but it works, whereas with PostgreSQL it just fails.
2. The Bean table uses a serial field for its primary key, the "bid" field, so I suspect something else needs to be worked out here. Maybe the Bean integration should work from the "bid" field instead of the delta?