Skip to content

Fix single-quote usage in HQLTests #55

@dzou

Description

@dzou

When investigating the HQLTests, it appears this test fails. It has something to do with the double single-quote literals in the string Joe''s. Determine if there is an adjustment to make this test pass.

HQLTest.java:924

@Test
@Ignore
public void test_hql_string_literals_example_2() {
	doInJPA( this::entityManagerFactory, entityManager -> {
		//tag::hql-string-literals-example[]
		// Escaping quotes
		List<Person> persons = entityManager.createQuery(
			"select p " +
			"from Person p " +
			"where p.name like 'Joe''s'", Person.class)
		.getResultList();
		//end::hql-string-literals-example[]
	});
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions