I have an update since my last post. It is technically possible to completely bypass the HBM-XML files and do the mapping stuff programmatically, a route that I will likely take (XML generation does not fit well in the arrangement and should be avoided). Taking this route will bring the defmodel/hbm-property arrangement at par with Java POJOs + annotations. Please check these links below on how to do Hibernate mapping programmatically:
https://www.hibernate.org/hib_docs/v3/api/org/hibernate/cfg/Configuration.html#createMappings() https://www.hibernate.org/hib_docs/v3/api/org/hibernate/cfg/Mappings.html > I've also looked into the dynamic-map stuff, but found only > rudimentary documentation, which caused me to give up. It's nice to > see that you seem to have gotten further. I got some simple tests working - CRUD sort of (no relationships yet). If you would like to take a look at the code, please let me know. > Also, I think the design should allow for future integration of > Hibernate-validation (bean-validation). That's a great alert - thanks! :-) Regards, Shantanu On Jul 23, 4:26 pm, pmf <phil.fr...@gmx.de> wrote: > I've also looked into the dynamic-map stuff, but found only > rudimentary documentation, which caused me to give up. It's nice to > see that you seem to have gotten further. > > For me personally, well-polished defmodel/hbm-property functionality > would be much more important than a query-DSL (since you plan to make > HQL accessible, this would be enough for me). > > To ease the transition from Java + Hibernate-annotations to Clojure + > hbm-property, it would be nice to have a strong (semantic) > correspondence between Hibernate-annotations and the hbm-property > construct (using lispified names and casing, as you already did, but > otherwise staying very close to the structure of the Hibernate- > annotations). > > Also, I think the design should allow for future integration of > Hibernate-validation (bean-validation). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---