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

Add support for computed fields #340

Open
yuvalek opened this issue Oct 31, 2023 · 4 comments
Open

Add support for computed fields #340

yuvalek opened this issue Oct 31, 2023 · 4 comments

Comments

@yuvalek
Copy link

yuvalek commented Oct 31, 2023

The code today does not support computed fields.
When sqlalchemy-continuum tried to create the versioned row it also tried to write a value to the computed column thus making an error.

@yuvalek
Copy link
Author

yuvalek commented Oct 31, 2023

My pr excludes computed columns when writing but still creates them in the DB.

@yoshpe
Copy link

yoshpe commented May 8, 2024

I've tested it, however the function versioned_column_properties isn't seemed to be called when generating the Metadata schema (the columns are still added to the history's table)

As a workaround, you can add 'exclude' to the __versioned__ key, and manually exclude the column, which works

@marksteward
Copy link
Collaborator

Yeah I'm not sure how we'd do this any way other than ignoring them. Suggestions welcome.

@yuvalek
Copy link
Author

yuvalek commented May 9, 2024

It is weird because I tested it locally when I wrote it and it did work and excluded the column.

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

3 participants