Dropwizard not serializing Entity object to JSON -
i have following entity object
@entity @table(name = "service") @namedqueries({ @namedquery( name = "findall", query = "select s service s") }) @jsonignoreproperties(ignoreunknown = true) @jsoninclude(jsoninclude.include.non_null) public class service implements comparable<service>, serializable { private static final long serialversionuid = 1l; @jsonproperty @id @generatedvalue(strategy = generationtype.identity) long id; @jsonproperty env and test
@test public void serializestojson() throws exception { service service = new service("test") assertthat(mapper.writevalueasstring(service)).isequalto(fixture("fixtures/serviceresource.json")); } and teh fixture
{"id":0,"env":"test"} this passes, no problem. when change 'env' 'environment' test fails still expecting 'env'. why not honor changes?
Comments
Post a Comment