Skip to content

how to set an attribute when it is a key generated type? #919

Open
@weiyongh

Description

@weiyongh

Thanks for such a great ORM library. Now I use requery for different OS such as windows, linux, android. It is cool when I put it in GraalVM native environement. It help me a lots to do something quickly and in a lighter way.

I have a question. If I construct my model by abstract class way, such as,

abstract class BaseSomething {
@key @generated
int id;
}

I find that the generated Somthing class has no accessor method for setId(int). I think it is a bit confuse especially when I do something, for example I want to construct Somthing with a special id when I do unit testing.

Can I walk around this limitation?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions