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 this at the boot-model le

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 > association between them, "prope

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 fl

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 ) > .table( "P

Re: [hibernate-dev] Programmatic entity mapping API

2017-10-24 Thread Gunnar Morling
Anyone with thoughts on this? To elaborate, here's what I have in mind: EntityMapping mapping = session.addEntityMapping(); mapping.entity( Person.class ) .table( "PERSONS" ) .property( "personId" ) .id() .strategy( Strategy.IDENTITY ) .p