Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Comment about not returning persistence entities #114

Open
Bernardo-MG opened this issue Apr 14, 2018 · 1 comment
Open

Comment about not returning persistence entities #114

Bernardo-MG opened this issue Apr 14, 2018 · 1 comment
Assignees
Labels

Comments

@Bernardo-MG
Copy link
Owner

Persistence entities should not be used outside a transaction. This means for example they should not be used to generate JSON messages.

The problem here is that lazy fields may not be initialized before generating the JSON.

@Bernardo-MG Bernardo-MG self-assigned this Apr 14, 2018
@Bernardo-MG
Copy link
Owner Author

There is also the reverse problem. When working with entities inside a transaction a change to the entity may be persisted, even when not stated explicitly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant