Re: [hibernate-dev] Programmatic entity mapping API

2017-10-24 Thread Steve Ebersole
On Tue, Oct 24, 2017 at 8:38 AM Gunnar Morling wrote: > Sure. But it's great to know that you'd find it useful and can imagine > adding it. Thanks! > In fact we have similar requirement in ORM itself for hibernate-envers, but again the initial expectation is supporting

Re: [hibernate-dev] Programmatic entity mapping API

2017-10-24 Thread Gunnar Morling
2017-10-24 15:08 GMT+02:00 Steve Ebersole : > Of course you pick the easy case to illustrate :) A single entity with > nothing but basic attributes or self-referential associations is going to > be relatively simple. The trickier stuff is adding 2 entities with >

Re: [hibernate-dev] Programmatic entity mapping API

2017-10-24 Thread Steve Ebersole
Of course you pick the easy case to illustrate :) A single entity with nothing but basic attributes or self-referential associations is going to be relatively simple. The trickier stuff is adding 2 entities with association between them, "property-ref" FKs, etc. Then your fluent API is not so

Re: [hibernate-dev] Programmatic entity mapping API

2017-10-24 Thread Alessio Stalla
That would be great for framework developers as well. Il 24 ott 2017 12:01, "Gunnar Morling" ha scritto: > Anyone with thoughts on this? To elaborate, here's what I have in mind: > > EntityMapping mapping = session.addEntityMapping(); > mapping.entity( Person.class

[hibernate-dev] Programmatic entity mapping API

2017-10-13 Thread Gunnar Morling
Hi all, This has crossed my mind for a few times: should we provide a programmatic API in Hibernate ORM for mapping entities, as an alternative mapping definition source to annotations and XML? I.e. something similar to the programmatic mapping APIs we have in Hibernate Validator and Search.