Corrected bugs and missing functions in locale entities.
Bug fixes in the PGSQL record dao, regarding binding values to a query.
I'm kinda drunk, there might still be bugs here...