Skip to content

Model attribute beginning with "_" leads to a NULL value #23

Description

@segalaj

Problem
Get the value of an element attribute named _ return always NULL

How to reproduce
Create a model like:

@Entity
public class Test {
    @Id
    private String id;

    private Date _date;

    public Test() {
    }

    public String getId() {
        return id;
    }

    public Date getDate() {
        return _date;
    }

    public void setDate(Date date) {
        this._date = date;
    }
}

Try to access to an element in a controller:

....
    @Model(value = Test.class)
    private OrientDbCrud<Test,String> _testCrud;
....
    @Route(method = HttpMethod.GET, uri = "")
    public Result test() {
        return ok(Iterables.toArray(_testCrud.findAll(), License.class)).json();
    }

Return:

[{"id":"#18:0","date":null,"handler":{}}]

Environment
Java 8, wisdom 0.7.0, wisdom-orientdb 0.2.4, orientdb 2.0.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions