[hibernate-dev] Framework built on top of Hibernate: BabyFish

Davide D'Alto davide at hibernate.org
Thu Oct 22 08:37:58 EDT 2015


Hi all,

I just want to mention that
a user on the Hibernate forum created a  framework on top of Hibernate:

https://forum.hibernate.org/viewtopic.php?f=1&t=1042072
https://github.com/babyfish-ct/babyfish

The main concept is around the use of an ObjectModel that replaces the
proxies and contains all the metadata to access the entities.

Here an example on how to define an object model in Java:
https://github.com/babyfish-ct/babyfish/blob/master/demo/babyfishdemo-om4java/src/main/java/org/babyfishdemo/om4java/fc/Employee.java

In JPA, the object model is generated during compile time and can be
accessed using:

private JPAObjectModelMetadata employeeOMM = JPAMetadatas.of(Company.class);

The ObjectModel provides a fluent API to get lazy associations,
disable/enable update on properties  and so on.

Cheers,
Davide


More information about the hibernate-dev mailing list