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

Implement embedding / conversion model #1

Open
ivan-gammel opened this issue Mar 30, 2022 · 0 comments
Open

Implement embedding / conversion model #1

ivan-gammel opened this issue Mar 30, 2022 · 0 comments
Milestone

Comments

@ivan-gammel
Copy link
Owner

As first PoC has shown viability of this approach, next step will be to implement the model for embedding entities and data type conversions.
The model must support reasonably deep embedding hierarchies and chaining of custom and built-in conversions, e.g.:

Embedding
Given following structure:

record A(@Embed B b) {}
record B(@Embed C c) {}
record C(@Embed D d) {}
record D(String value) {}

The following table could be mapped:

CREATE TABLE A (
  b_c_d_value VARCHAR(255)
);

Conversion
Given the following record:

record A(@Map(using = MyTimestampToInstant.class) MyTimestamp value) {}

The following table could be mapped, assuming conversion path from MyTimestamp to Instant and further to javax.sql.Timestamp.

CREATE TABLE A (
  value TIMESTAMP NOT NULL
);
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