Support for non-auto-incrementing ids.
Proper class names in error messages.