hakandilek / play2-crud

Simple CRUD & DAO implementation for play2
Other
142 stars 52 forks source link

NumberFormatException: null when using the create REST API controller #57

Open jjlueck-tock opened 9 years ago

jjlueck-tock commented 9 years ago

Should I be able to use the REST API to create a new Simple object without specifying the ID for the new Simple object created?

Running a command like this using the current source produces a NumberFormatException when trying to convert a non-existent id field of type Long from null:

$ curl -X POST -H "Content-type: application/json" -d '{"name": "new simple object"}' http://localhost:9000/api/Simple/create

Am I just missing something?