PavlidisLab / Gemma

Genomics data re-analysis
Apache License 2.0
23 stars 6 forks source link

Replace thaw() with Hibernate fetch profiles #1238

Open arteymix opened 1 month ago

arteymix commented 1 month ago

We can formalize mots of our thawing logic by declaring a fetching profile and enabling it when loading an entity. This would result in less boilerplate logic in the DAO.

arteymix commented 2 weeks ago

For the DAO, the best would be to have an annotation to enable and restore a given list of fetch profiles.

@EnableFetchProfile("array-design-with-composite-sequences")
ArrayDesign findWithCompositeSequences();

It could be validated on startup to make sure that the profile is declared.

Maybe Spring Data already has something similar we could borrow.