Archive

Archive for the ‘Databases’ Category

Why JPA refuses to persist Group objects

October 16, 2008 Leave a comment

Problem

When working in Java using tools like JPA you sometimes forget to keep the limitations of the underlying database in mind. I spend about an hour trying to find out why my custom Group objects didn’t get persisted, and MySQL complained about incorrect SQL syntax.

Read more…

Advertisements
Categories: Databases, Java Tags: ,

Why MySQL gave case insensitive string results

October 14, 2008 Leave a comment

Problem

Today MySQL was giving me crappy results… when I searched for a user with name ‘GUEST’ it gave me a user with name ‘Guest’. Which is close… but not close enough. Somehow MySQL handled my input in a case insensitive way.

During my journey across the internet looking for answers, I found that the case sensitivity of table names depends on your platform because MySQL uses files to store tables. I also found many users asking how to do case insensitive queries… but nobody answering *my* question.

Read more…