Skip to content

how to join two table? #139

@iobsessu

Description

@iobsessu

now, i have a User object and a Role object , it look like this:

class User {
    private int id;
    private String username;
    private int roleId;
}
class Role {
    private int id;
    private String roleName;
}

i wanna know, how can i serialize it to

 {
    id: 10,
    name: "Jack",
    roleId: 20,
    roleName: "admin"
}

instead of

{
    id: 10,
    name: "Jack,
    role: {
        id: 20,
        roleName: "admin"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions