Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking audits for Embedded objects #232

Open
wrvenkatesh opened this issue Jul 3, 2024 · 1 comment
Open

Tracking audits for Embedded objects #232

wrvenkatesh opened this issue Jul 3, 2024 · 1 comment

Comments

@wrvenkatesh
Copy link

Hi

I have a domain object with another domain object within it as one of the attributes. When using the plugin and persisting to the domain object along with embedded object, i am not seeing audits for the embedded object

For instance

class Employee {
String name;
EmployeeProfile profile;
}

class EmployeeProfile {
String nationality;
}

Below is just an example and not actual code
EmployeeProfile profile = new EmployeeProfile();
profile.nationality = "India";

Employee employee = new Employee();
employee.name = "John Doe";
employee.profile = profile;

employee.save(flush: true);

I have created 2 new domain objects each for the audit separately.

Expected Behavior:

When i save employee, i am expecting both the audit tables to be tracked separately for the attributes that has changed

Actual Behavior:

Employee audit table gets tracked for the attributes including profile where profile's id value is tracked.
EmployeeProfile audit table is not touched at all. No attributes of this domain is being tracked

How do I make sure both domain attributes are being tracked? What change should I make to incorporate that? Any help is much appreciated.

Environment Information

Operating System: Windows
GORM Version:
Grails Version (if using Grails): 4.0.10
JDK Version: Java 8

Thanks
Venkatesh

@wrvenkatesh
Copy link
Author

@robertoschwald - any help here on my question?

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

No branches or pull requests

1 participant