Erik Pragt
2014-05-18 20:48:04 UTC
Hi guys,
A small question on the mailing list, while it’s still possible:
I’m building a small application, and in part of the UI you can sort some objects (persons). So when I call this url:
http://localhost:8080/addressbook/person/list?sort=name
All works nicely. However, when I change the URL to the following, my application is throwing exceptions:
http://localhost:8080/addressbook/person/list?sort=thisisanunknowproperty
I get errors like:
Class
org.hibernate.QueryException
Message
could not resolve property: thisisanunknownproperty of: persons.Person
This is really not what I want, of course. The application should just not sort, and not throw exceptions like this. But how do I prevent this stuff from happening? Should I build something in which checks if the property is a member of the allowed properties to sort on? Is there anything out of the box for this?
Any advice more than welcome!
Thanks,
Erik
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
A small question on the mailing list, while it’s still possible:
I’m building a small application, and in part of the UI you can sort some objects (persons). So when I call this url:
http://localhost:8080/addressbook/person/list?sort=name
All works nicely. However, when I change the URL to the following, my application is throwing exceptions:
http://localhost:8080/addressbook/person/list?sort=thisisanunknowproperty
I get errors like:
Class
org.hibernate.QueryException
Message
could not resolve property: thisisanunknownproperty of: persons.Person
This is really not what I want, of course. The application should just not sort, and not throw exceptions like this. But how do I prevent this stuff from happening? Should I build something in which checks if the property is a member of the allowed properties to sort on? Is there anything out of the box for this?
Any advice more than welcome!
Thanks,
Erik
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email