I\'m working with JPA (Hibernate as provider) and an underlying MySQL database.
I have a table containing every name of streets in Germany. Every streetname has a un
To stay "independant" as you say for database and JPA provider i would avoid the getSingleResult() and fetch the list() and match in memory for the name. Probably you will get more than one but not 100 or more.
Another way could be to save the name normalised (trimmed, to lower case) in a new field.