improved nuodb/rails type mapping