Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-bekhta committed Aug 8, 2024
1 parent 0791228 commit 6ef07bf
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1860,4 +1860,27 @@ public String testBug31117() {
Assertions.assertEquals(1, Person.delete("\r\n \n\ndelete\nfrom\n Person2\nwhere\nname = ?1", "foo"));
return "OK";
}

@GET
@Path("42416")
@Transactional
public String testBug42416() {
Person.deleteAll();
Person p = new Person();
p.name = "stef";
p.persist();

Person p2 = new Person();
p2.name = "stef";
p2.persist();

try {
Person found = Person.find("where name = ?1", "stef").singleResult();
} catch (jakarta.persistence.NonUniqueResultException e) {
return "OK";
} catch (org.hibernate.NonUniqueResultException e) {
e.printStackTrace();
return "KO";
}
}
}

0 comments on commit 6ef07bf

Please sign in to comment.