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 TREAT operator #120

Closed
beikov opened this issue Apr 25, 2015 · 6 comments
Closed

Add support for TREAT operator #120

beikov opened this issue Apr 25, 2015 · 6 comments

Comments

@beikov
Copy link
Member

beikov commented Apr 25, 2015

JPA 2.1 introduced the TREAT operator and we should add support for that in the parser and the API.

@beikov beikov self-assigned this Apr 25, 2015
@beikov beikov added this to the 1.0.1 milestone Apr 25, 2015
@beikov
Copy link
Member Author

beikov commented Apr 26, 2015

@beikov
Copy link
Member Author

beikov commented Apr 28, 2015

Treat is allowed to be used as

  • join path expression
  • normal path expression

We have to reflect that in the grammar

@beikov beikov modified the milestones: 1.0.2, 1.0.1 May 20, 2015
@beikov beikov modified the milestones: 1.0.3, 1.0.4 Jun 5, 2015
@beikov beikov modified the milestones: 1.0.5, 1.0.4 Jun 20, 2015
@beikov beikov modified the milestones: 1.0.6, 1.0.5 Aug 5, 2015
@beikov beikov modified the milestones: 1.1.0, 1.0.6 Aug 17, 2015
@beikov beikov modified the milestones: 1.2.0, 1.1.0 Jan 23, 2016
@beikov beikov assigned Mobe91 and unassigned beikov Feb 19, 2016
@beikov beikov assigned beikov and unassigned Mobe91 Aug 3, 2016
@beikov
Copy link
Member Author

beikov commented Aug 23, 2016

I created a testsuite for treat operator testing and started dicussions in the forums of EclipseLink and Hibernate. Let's see what they say before we start implementing something.

@beikov
Copy link
Member Author

beikov commented Sep 6, 2016

I implemented rudimental treat support in the core: 1d3fd3c
Since hibernate and datanucleus implement implicit subtype property resolving, most cases can work without rendering the treat through to the final query.
The edge cases described in the testsuite could actually be fixed or at least be handled in a deterministic way, but I'd rather wait for a request for it or a statement from the EclipeLink or Hibernate community regarding the treat issues.

@beikov
Copy link
Member Author

beikov commented Sep 6, 2016

Also note that #123 contains the explanation of a workaround for some treat limitations.

@beikov
Copy link
Member Author

beikov commented Feb 12, 2017

  • Integrate tests from the jpa-treat-variations repository
  • Implement workarounds for making tests work Deferring as Hibernate can handle all cases
  • Implement criteria support
  • Documentation
  • Create tests that use a TREAT as fetch parent for fetchOnly()

Notes for possible workaround implementations

  • We could introduce virtual predicates that contain TREAT expressions for other subtypes to workaround premature subtype filtering issues

Notes about limitations

beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 28, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 28, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 29, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 30, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 31, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 31, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 31, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 31, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 31, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 31, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Mar 31, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 13, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 13, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 14, 2017
@beikov beikov closed this as completed in d0a7785 Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants