Skip to content

Change how child records are stored (don't use PrivateAttr) - #967

Merged
bennybp merged 1 commit into
mainfrom
cache_serial
Aug 21, 2025
Merged

Change how child records are stored (don't use PrivateAttr)#967
bennybp merged 1 commit into
mainfrom
cache_serial

Conversation

@bennybp

@bennybp bennybp commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

Description

This changes the way child records are stored internally inside records. Before, they were stored as PrivateAttr, which means they were never serialized if you used pydantic's dict() function.

However, for saving/transferring/ingesting complete records, we want those child records in place. So this PR makes those child records regular fields.

However, we DON'T want those child records when writing to cache files (where they are handled differently). So a separate function was added for that.

Status

  • Code base linted
  • Ready to go

@bennybp

bennybp commented Aug 21, 2025

Copy link
Copy Markdown
Contributor Author

I've given this a test with reading existing dataset view files, and it works for me. So as far as I can tell this is backwards compatible (as long as you are using the public API).

@bennybp
bennybp merged commit b14f2d1 into main Aug 21, 2025
23 checks passed
@bennybp
bennybp deleted the cache_serial branch August 21, 2025 15:49
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

Successfully merging this pull request may close these issues.

1 participant