4 ms·
While this may work for greenfield applications, I don't see this working well for preexisting schemas. From their getting started page: "Database fields are au
by drzaiusx11 3y ago
While this may work for greenfield applications, I don't see this working well for preexisting schemas. From their getting started page: "Database fields are automatically created for any abstract getter methods", which definitely scares me away since they seem to be relying on automatic field type conversions.
I prefer to manage my schemas when I can and do type and DAO conversions via mapper classes in the very simple and elegant JDBI framework where you write SQL annotations above your DAO methods https://jdbi.org/#_declarative_api https://jdbi.org/#_declarative_api
JDBI does wonders for wonky old schemas you've inherited, since joins etc work out of the box (just throw them in your annotations!) The annotations can also link to .SQL files for the big hairy queries.
All these "do magic" frameworks (hibernate being one of the first) work in the simple cases but then fall apart whenever you need to do anything complex/not-prescribed. I end up having to dig into the internals of the framework to see what's going wrong which negates their whole value add.
- drzaiusx11 3y agoNote: JDBI is an ORM where you provide the M directly (or use its default bean mapper class for simple schemas) NOT to be confused with JDBC or ODBC which are entirely different beasts
- mike_hearn 3y agoIt's worth calling out that Permazen isn't for accessing SQL databases. It's a completely different thing. So all software that uses it is by definition greenfield.
- drzaiusx11 3y agoFrom the first bullet on permazen's "what is it?" section: "A Java persistence layer for SQL, key-value, or in-memory databases" So it clearly is designed for accessing SQL databases
- mike_hearn 3y agoIt can use a SQL DB as a key value store, but you don't get any of the advantages of using an RDBMS when you do that. The tables are literally two columns: key+value. It's more a mode for if that's all you have available for whatever reason.