We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to find child by parent bean which using @SoftDelete.
This is example.
@Test public void testParentJoinWithSoftDelete() { EBasicSoftDelete bean = new EBasicSoftDelete(); bean.setName("Joined with deleted false"); DB.save(bean); final EBasicSDChild child = new EBasicSDChild(bean, "Find me from parent name", 1L); DB.save(child); Query<EBasicSDChild> query = DB.find(EBasicSDChild.class).where().eq("owner.name", "Joined with deleted false").query(); List<EBasicSDChild> list = query.findList(); // Make sure that query includes the soft delete join predicates assertSql(query).contains("t1.deleted = false"); assertThat(list).hasSize(1); // Cleanup created entity query.delete(); DB.deleteAllPermanent(singletonList(child)); DB.deleteAllPermanent(singletonList(bean)); }
I expect
select t0.id, t0.child_name, t0.amount, t0.version, t0.deleted, t0.owner_id from ebasic_sdchild t0 join ebasic_soft_delete t1 on t1.id = t0.owner_id and t1.deleted = false where t1.name = ? and t0.deleted = false
but, actually
select t0.id, t0.child_name, t0.amount, t0.version, t0.deleted, t0.owner_id from ebasic_sdchild t0 join ebasic_soft_delete t1 on t1.id = t0.owner_id where t1.name = ? and t0.deleted = false
Is this expected behavior?
Thanks.
No, this is a bug.
The text was updated successfully, but these errors were encountered:
So this is specifically on joins that are added to support query expressions - "extra joins" as opposed to joins added to support fetching.
Sorry, something went wrong.
#2145 - SoftDelete predicate missing on join to ManyToOne supporting …
0c1657f
…predicate expression
rbygrave
No branches or pull requests
I want to find child by parent bean which using @SoftDelete.
This is example.
I expect
but, actually
Is this expected behavior?
Thanks.
No, this is a bug.
The text was updated successfully, but these errors were encountered: