Hi,
I'm experiencing major performance issues when trying to audit complex objects with Javers.
The main problem is that Javers gets the whole object with all its dependencies, and if those dependencies has other dependencies, it falls into an endless recursion that takes a lot of time. I was wondering if is there any way to make Javers record just the FK values for the dependencies instead of the whole nested object?
I'll try to clear that with an example:
Entity User
-Long id
-String login
-Person person
Entity Person
-Long id
-String name
-User registerUser
The tables would be like this:
User
-id PK
-login
-personId FK
Person
-id PK
-name
-userId FK
If I audit User, Javers will try to fetch the whole person, which has another user, that has another person, and this will go on and on untill the end of the recursion. Combine that with hibernate's lazy initialization of those dependencies, and we will have a bottleneck in the transaction.
What I need is: if try to audit User, Javers get the User object, with its person having only the id attribute filled, ignoring the rest of the object, that, for User auditing, it's useless information.
What you guys think about this?
Cheers
Nick
Hi,
I'm experiencing major performance issues when trying to audit complex objects with Javers.
The main problem is that Javers gets the whole object with all its dependencies, and if those dependencies has other dependencies, it falls into an endless recursion that takes a lot of time. I was wondering if is there any way to make Javers record just the FK values for the dependencies instead of the whole nested object?
I'll try to clear that with an example:
Entity User
-Long id
-String login
-Person person
Entity Person
-Long id
-String name
-User registerUser
The tables would be like this:
User
-id PK
-login
-personId FK
Person
-id PK
-name
-userId FK
If I audit User, Javers will try to fetch the whole person, which has another user, that has another person, and this will go on and on untill the end of the recursion. Combine that with hibernate's lazy initialization of those dependencies, and we will have a bottleneck in the transaction.
What I need is: if try to audit User, Javers get the User object, with its person having only the id attribute filled, ignoring the rest of the object, that, for User auditing, it's useless information.
What you guys think about this?
Cheers
Nick