Skip to content

Mutation query with Joined Inheritance for databases supporting Global Temporary Tabels #2398

@dreab8

Description

@dreab8

Given :

@Entity(name = "GeneratedWithIdentityParent")
	@Inheritance(strategy = InheritanceType.JOINED)
	static class GeneratedWithIdentityParent {
		@Id
		@GeneratedValue(strategy = GenerationType.IDENTITY)
		public Long id;

		public String firstname;
	}

	@Entity(name = "GeneratedWithIdentity")
	static class GeneratedWithIdentity extends GeneratedWithIdentityParent {
		public String updatedBy;
	}

the test

@Test
	public void testInsert(VertxTestContext context) {
		String firstName ="Davide";
		test( context, getMutinySessionFactory()
			.withTransaction( session ->
				session.createMutationQuery( "insert into GeneratedWithIdentity (firstname) values (:name)" )
				.setParameter( "name", firstName )
				.executeUpdate())
		);
	}

fails when executed against Oracle with the following error

Cannot invoke "java.util.concurrent.CompletionStage.toCompletableFuture()" because the 
return value of "java.util.function.Function.apply(Object)" is null
java.lang.NullPointerException: Cannot invoke "java.util.concurrent.CompletionStage.toCompletableFuture()" 
because the return value of "java.util.function.Function.apply(Object)" is null

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions