I've got an entity with only two properties:
Code:
class Entity:
@Id
Long id;
@Transient
String transientProperty;
The transient property is populated from an Interceptor#instantiate method:
Code:
Interceptor#instantiate:
entity.setTransientProperty(...);
return entity;
So I would expect this code not to hit the db:
Code:
main:
entity = session.load(id);
entity.getId(); // Does not hit the db
entity.getTransientProperty(); // Hits the db, then calls Interceptor#instantiate
Is there any way to prevent this code from executing any SQL? It shouldn't be necessary as the only non-transient property is the actual PK.
Thanks,
ms