Hi all,
I've been thinking about generating Exposed Tables (and maybe entities) from POJO entity classes, I am looking for a way to keep my domain models pure data classes, so don't clutter them with JPA annotations, while preventing having to write and maintain a separate database definition like with Exposed DSL + DAO.
Komapper comes close, but uses KSP and meta classes to map annotations on, inducing the need to maintain these together with the domain models, and preventing IDE level type checking.
What I have in mind is a DSL based configuration per entity
Anyone seeing any (fundemental) obstacles on the road for a solution like this? Or knows a library that does something like this?
e
Endre Deak
05/16/2022, 5:48 PM
looks promising to me
Endre Deak
05/16/2022, 5:48 PM
and haven’t seen anything similar out there so far
Endre Deak
05/16/2022, 8:55 PM
how would you check if config matches the entity definition? Preferably compile time
I guess we could infer property type from the entity, or indeed provide a custom property type like intProperty. We could also provide an Exposed-like transform function in the property config.