Hi guys,
Short sumarry: Wonder if hibernate could get a feature to kind of either
unproxy or freeze the entities once leaving the managed context to avoid
uncontrolled lazy loading on one side and serialization issues on another
side.
Use case example: a common example is a REST service exposing
Sounds good. I hope the secondary table stuff is getting defined on a
higher level(EntityPersister/AbstractEntityPersister). I had problems
implementing OneToOne-JoinTable support for
TablePerClass(UnionSubclassPersister) a while ago and I guess that was
because there is no notion of secondary
Hey Romain,
I don't think it is a good idea to expose entities directly if you
really need a subset of the data.
Reasons for that thinking are that it gets hard to define what needs to
be fetched or is safe to be used for a particular use case. Obviously
serialization is like a follow-up proble
Hi,
Although I keep on seeing this request from time to time, I still think
it's more like a Code Smell.
Entities are useful for when you plan to modify them. Otherwise, a DTO
projection is much more efficient, and you don't suffer from
LazyInitializationException.
With the ResultTransformer, you
Well here is how I see things:
1. mappers: until model is different from the jpa mapping it doesn't make
much sense and with microservices and failfast trends it doesn't make as
much sense as it was some years ago - plese don't assume I agree but just
sharing what I see.
1.bis. you get the same is
See inline...
On Tue, Apr 18, 2017 at 8:36 PM Gail Badner wrote:
> Should Hibernate support negative sequence values?
>
Absolutely. Hibernate has historically supported decrementing and/or
negative values - so yes that should continue to work.
If so, is my proposed fix OK?
>
Define "OK" :)
On Wed, Apr 19, 2017 at 6:00 AM Christian Beikov
wrote:
> Sounds good. I hope the secondary table stuff is getting defined on a
> higher level(EntityPersister/AbstractEntityPersister). I had problems
> implementing OneToOne-JoinTable support for
> TablePerClass(UnionSubclassPersister) a while ago
This was actually the intent of the original introduction of EntityMode and
specifically the DOM4J EntityMode. But that stuff was deemed "outside the
scope" of Hibernate proper.
As others have stated in reply, I think this is really best served by a
use-case-specific combination of dynamic fetch