周子杰 (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5fc7cba...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZjRjYWQ5OTli...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16760?atlOrigin=eyJpIjoiZjRjYW...
) HHH-16760 (
https://hibernate.atlassian.net/browse/HHH-16760?atlOrigin=eyJpIjoiZjRjYW...
) The multi-tenant filter does not work (
https://hibernate.atlassian.net/browse/HHH-16760?atlOrigin=eyJpIjoiZjRjYW...
)
Issue Type: Bug Affects Versions: 6.2.4 Assignee: Unassigned Components: hibernate-core
Created: 06/Jun/2023 23:12 PM Environment: hibernate-core 6.2.2.final Labels: filter
hibernate-core multi-tenancy Priority: Major Reporter: 周子杰 (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5fc7cba...
)
I used column-based partitioning for multi-tenancy, but it didn't work. I tried
lowering the version to 6.1.x final versions and it worked.
// This will fail in 6.2.4final
@Test
void contextLoads() {
currentTenantIdentifierResolver.setCurrentTenant( "1" );
Person person = new Person();
person.setId(1L);
personRepository.save(person);
currentTenantIdentifierResolver.setCurrentTenant( "2" );
Assertions.assertTrue(personRepository.findById(1L).isEmpty());
}
That's the problem now. I haven't had time to find out why
(
https://hibernate.atlassian.net/browse/HHH-16760#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16760#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:62413c2 )