This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
That comparison of strings should not be affected by their representation in the persistent store (eg, with regard to padding etc.). Two strings are equal if and only if they contain the same sequence of characters. This is different to SQL.
My question is: how is it different to SQL? Does it mean that the following EJB-QL select object(e) from EmployeeSchema e where e.firstName = 'John'
will return all employees with the first name of John even those that contain blank spaces (eg, employees with first name ' John ' will be selected)
while the following SQL select * from EmployeeTable where FirstName = 'John'
will not select employees whose first names are not exactly John (eg, employees with ' John ' as the first name will not be selected)