2 ms·
We used hibernate, which does the opposite (Java classes/annotations -> SQL). You'd still have the same disadvantages: having an imperfect "clone" of your schem
by _bxg1 8y ago
We used hibernate, which does the opposite (Java classes/annotations -> SQL). You'd still have the same disadvantages: having an imperfect "clone" of your schema.
- Jyaif 8y agoCan you elaborate what you mean by "imperfect"?
- _bxg1 8y agoA Java string isn't precisely the same thing as a varchar(255), for example. Nor is an ArrayList (ordered) the same thing as a set of rows (unordered). Mapping between these slightly different sets of concepts usually works well enough, but it's an additional piece of disjointedness.
- threeseed 8y agoBut it's unavoidable. At some point you have to do that translation. And I would rather leave that up to the ORM where it fundamental to what they do then reimplement it.