Closed gavinking closed 10 months ago
A very useful operation that we recently added in Hibernate is this one:
<T> T getReference(T object);
It's job is to turn a reference to a detached entity into a reference associated with the persistence context.
It's just a shortcut way to write:
em.getReference(entity.getClass(),entity.getId())
I know it seems like a completely trivial little thing, but sometimes conveniences like this can be very helpful.
A very useful operation that we recently added in Hibernate is this one:
It's job is to turn a reference to a detached entity into a reference associated with the persistence context.
It's just a shortcut way to write:
I know it seems like a completely trivial little thing, but sometimes conveniences like this can be very helpful.