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 initial support for @EmbeddedId, permitting composite keys. #88

Merged
merged 5 commits into from
Apr 10, 2024

Conversation

vnayar
Copy link
Contributor

@vnayar vnayar commented Apr 1, 2024

More work will be needed to support @onetomany and @manytoone using a composite key, the JPA @JoinColumns annotation will be needed to support this. However, with this change, at least some options exist for dealing with composite-keys rather than just facing a brick wall.

See #85

More work will be needed to support @onetomany and @manytoone using a composite key, the JPA
@JoinColumns annotation will be needed to support this. However, with this change, at least
some options exist for dealing with composite-keys rather than just facing a brick wall.
@vnayar
Copy link
Contributor Author

vnayar commented Apr 5, 2024

@SingingBush Let me know if there are any gaps or things to be added before this can be merged. There are a few gaps that I'm aware of at the moment including:

  • Schema generation for primary keys related to @EmbeddedId has not yet been added.
  • This feature is closely related to Hibernate @JoinColumns in order to implement the concepts of @ManyToOne and @ManyToMany.

However, the feature adds value even in its current form, as it allows representation of existing databases that use compound keys, something not possible before.

@SingingBush
Copy link
Collaborator

The limitations seem ok as long as it's clearly documented. Could you add some details to the readme about the support for composite keys.

@vnayar
Copy link
Contributor Author

vnayar commented Apr 9, 2024

README updated with notes about the current state of implementation. More work will of course come to address these shortcomings as time permits.

@SingingBush SingingBush merged commit ad4a13b into buggins:master Apr 10, 2024
41 checks passed
@SingingBush SingingBush added this to the 0.5.0 milestone Apr 19, 2024
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.

2 participants