[JIRA] (HSEARCH-4727) OutboxEvent "payload" column created as blob(255) with DB2
by Yoann Rodière (JIRA)
Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *created* an issue
Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiZTJjZTk0... ) / Bug ( https://hibernate.atlassian.net/browse/HSEARCH-4727?atlOrigin=eyJpIjoiZTJ... ) HSEARCH-4727 ( https://hibernate.atlassian.net/browse/HSEARCH-4727?atlOrigin=eyJpIjoiZTJ... ) OutboxEvent "payload" column created as blob(255) with DB2 ( https://hibernate.atlassian.net/browse/HSEARCH-4727?atlOrigin=eyJpIjoiZTJ... )
Issue Type: Bug Assignee: Unassigned Components: mapper-orm-coordination-outbox-polling Created: 24/Oct/2022 02:31 AM Fix Versions: 6.2-backlog, 6.1.8.Final Priority: Major Reporter: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... )
For some reason, with DB2, we get the following schema for the outbox-polling tables:
create table HSEARCH_AGENT (
id bigint not null,
type integer,
name varchar(255),
expiration timestamp,
state integer,
totalShardCount integer,
assignedShardIndex integer,
payload blob(255),
primary key (id)
)
Hibernate:
create table HSEARCH_OUTBOX_EVENT (
id bigint not null,
entityName varchar(256),
entityId varchar(256),
entityIdHash integer,
payload blob(255),
retries integer,
processAfter timestamp,
status integer,
primary key (id)
)
blob(255) is way too small, and ideally we would need an unbounded data type.
( https://hibernate.atlassian.net/browse/HSEARCH-4727#add-comment?atlOrigin... ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-4727#add-comment?atlOrigin... )
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=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:392b984 )
2 years, 2 months
[JIRA] (HHH-15622) Query bug in @NamedEntityGraph when doing Eager loading of @OneToOne mappings in Single Table inheritance
by Søren Jepsen (JIRA)
Søren Jepsen ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ca1c89... ) *created* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZDU4NmJmZThm... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-15622?atlOrigin=eyJpIjoiZDU4Nm... ) HHH-15622 ( https://hibernate.atlassian.net/browse/HHH-15622?atlOrigin=eyJpIjoiZDU4Nm... ) Query bug in @NamedEntityGraph when doing Eager loading of @OneToOne mappings in Single Table inheritance ( https://hibernate.atlassian.net/browse/HHH-15622?atlOrigin=eyJpIjoiZDU4Nm... )
Issue Type: Bug Affects Versions: 6.0.0, 6.1.3, 6.1.4 Assignee: Unassigned Components: hibernate-core, hibernate-entitymanager Created: 24/Oct/2022 01:17 AM Environment: Hibernate 6.1.3.Final
Postgres 14
Java version: 17.0.3, vendor: Eclipse Adoptium
MacOS Montery 12.5
Priority: Major Reporter: Søren Jepsen ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ca1c89... )
There appears to be a bug in *@NamedEntityGraph* ( https://github.com/entitygraph ) when trying to eager load a *@OnetoOne* ( https://github.com/OnetoOne ) mapping with *@Mapsid* ( https://github.com/mapsid ) in a Single Table inheritance setup.
When doing eager loading, I get the following error:
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: uuid = character varying Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
Generated sql:
'select p1_0.id,d1_0.parent_id,d1_0.dtype,d1_0.organization_id,d1_0.module_width,p1_0.organization_id from physical_aspect p1_0 left join physical_aspect_definition d1_0 on p1_0.id=d1_0.dtype where p1_0.organization_id=?'
Seems like trying to compare id=dtype (discriminator column).
The bug appears in Hibernate 6.1.3 and previous versions og 6.
The @NamedEntityGraph ( https://github.com/entitygraph ) feature is tested working with Hibernate 5.6.11
I've included a testcase for both 6.1.3 and 5.6.11.
-> See EagerLoadingEntityGraphTest#testEagerloadingByNamedEntityGraphAnnotationFails()
( https://hibernate.atlassian.net/browse/HHH-15622#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-15622#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=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:392b984 )
2 years, 2 months