Skip to content

Change Tracking with Default Values for Properties #170

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

Open
tsteckenborn opened this issue Apr 9, 2025 · 1 comment
Open

Change Tracking with Default Values for Properties #170

tsteckenborn opened this issue Apr 9, 2025 · 1 comment
Assignees

Comments

@tsteckenborn
Copy link

tsteckenborn commented Apr 9, 2025

Hi there,

This is more of a note as I'm unsure of the intended behaviour.

Currently when you've got a property with a default value under change tracking you'll get no entry in case you don't provide a value. In case you supply a value, you'll get an entry with the create modification.

So e.g. if there's something in that direction:

entity Something {
    key ID                   : UUID;
       @changelog SomeFlag               : Association to Flag default 'X';
}

As far as I can see if you don't provide the value for SomeFlag you'll not get a create change entry.

@nkaputnik
Copy link
Contributor

Hello @tsteckenborn
the differ, which catches changes works on Request/Service Entity level, while default values are implemented at the DB-driver level, so there is no straightforward way to identify it. From the perspective of the plugin, the SomeFlag property of the request is empty.
We would actually need to intercept the generated INSERT statement two levels deeper and compare it to the request, which wouldn't be feasible.

Best,
Nick

@nkaputnik nkaputnik self-assigned this Apr 23, 2025
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

2 participants