jmoiron / modl

golang database modelling library
MIT License
479 stars 48 forks source link

No support for non-integer "auto-next" primary keys #20

Open jmoiron opened 9 years ago

jmoiron commented 9 years ago

From a bug report in IRC. With a pg table defined like this:

id uuid primary key default uuid_generate_v4()

The Dialect InsertAutoIncr(...) (int64, error) obviously fails scanning the returned id into an int64. Gorp has added new APIs for this (in order to prevent breaking existing code), will follow suit with modl.

jmoiron commented 9 years ago

The first part of this is sorta complete. What has to happen now is the new interface must be use in place of the old one, before doing this I want to get the sqlx reflectx mapper integrated with modl in order to be able to store AutoIncrField names and be able to quickly get them as scan targets. This is going to be necessary in the long run anyway and should clean up a lot of modl code.

ferhatelmas commented 9 years ago

Could you please give a status update?