3 ms·
Given the state of the art of golang ORMs, I guess this might be a plus. I have tried xorm and gorm (besides database/sql) and while I settled on gorm, they bo
by znpy 10y ago
Given the state of the art of golang ORMs, I guess this might be a plus.
I have tried xorm and gorm (besides database/sql) and while I settled on gorm, they both have some fundamental design flaws:
* xorm onInsert/onUpdate hooks are designed the wrong way. Last time I tried, hooks received object instances by value and not by reference, meaning I could not actually update things before hitting the database.
* both xorm and gorm have schema-generation capabilities, but have you looked at the schema they generate? Last time I checked, gorm-generated schemas had basically no referential integrity whatsoever, and no foreign key was being generated.
But I guess it's only time before a well-done golang ORM shows up.