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

Support for storing whole entities as JSON documents #4

Open
BenMorel opened this issue May 13, 2019 · 1 comment
Open

Support for storing whole entities as JSON documents #4

BenMorel opened this issue May 13, 2019 · 1 comment

Comments

@BenMorel
Copy link
Member

Several databases now have first-class support for JSON, allowing to store whole entities as JSON documents, like in a NoSQL database.

We do have support for individual JSON columns, but it would be interesting to add support to store a whole entity (all properties) as a single JSON column.

The table would look like:

id   INT PRIMARY KEY
data JSON

It should be possible to mix entities mapped in a typical object-to-relational way, and entities mapped to JSON, in the same application, with support from this library.

@BenMorel BenMorel changed the title Support for storing whole entities as documents Support for storing whole entities as JSON documents May 13, 2019
@BenMorel
Copy link
Member Author

BenMorel commented May 13, 2019

Note: instead of just choosing between the relational or document model for a given entity, it could also be interesting to have the option to save a single entity to both a set of relational tables, and a denormalized JSON table.

The database could contain both models simultaneously: a relational write model, and a denormalized read model.

The ORM could handle transparent persistence to both models.

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