Skip to content

Commit

Permalink
Fix a couple failures on CockroachDB
Browse files Browse the repository at this point in the history
  • Loading branch information
mbladel committed Oct 21, 2024
1 parent 75885b9 commit 7aeb922
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.CockroachDialect;
import org.hibernate.testing.orm.junit.SkipForDialect;
import org.hibernate.type.SqlTypes;

import org.hibernate.testing.orm.junit.DialectFeatureChecks;
Expand Down Expand Up @@ -36,6 +38,7 @@ public class ArrayOfArraysTest {
@SessionFactory
@ServiceRegistry( settings = @Setting( name = AvailableSettings.HBM2DDL_AUTO, value = "create-drop" ) )
@Test
@SkipForDialect( dialectClass = CockroachDialect.class, reason = "Unable to find server array type for provided name bytes" )
public void testDoubleByteArrayWorks(SessionFactoryScope scope) {
final Long id = scope.fromTransaction( session -> {
final EntityWithDoubleByteArray entity = new EntityWithDoubleByteArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
package org.hibernate.orm.test.tenantid;

import jakarta.persistence.Column;
import org.hibernate.annotations.TenantId;
import org.hibernate.boot.SessionFactoryBuilder;
import org.hibernate.boot.spi.MetadataImplementor;
Expand Down Expand Up @@ -115,6 +116,7 @@ static class RootEntity {
private Long id;

@TenantId
@Column(name="tenant_col")
private String tenant;

@OneToOne( cascade = CascadeType.PERSIST )
Expand Down Expand Up @@ -143,6 +145,7 @@ static class ChildEntity {
private Long id;

@TenantId
@Column(name="tenant_col")
private String tenant;

@OneToOne( mappedBy = "child" )
Expand Down

0 comments on commit 7aeb922

Please sign in to comment.