Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add default value and pk autoincrement #349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add default value and pk autoincrement #349

wants to merge 1 commit into from

Conversation

joinee0208
Copy link

hi! the request include two features.

1:add property's default value.user can use like follows:
table.addIntProperty("UpdateAt").defValue("0");

2:add one more constructor.If the primary key is set to autoincrement,then the primary key column need not to be valued.as follows:

public class Demo {

    private Long id;//the id is primary key.
    private Long UpdateAt;

    public Demo() {
    }
    public Demo(Long UpdateAt) {

        if(this.UpdateAt==null)this.UpdateAt = 0l;
    }
    public Demo(Long id,Long UpdateAt) {
        this.id = id;
        if(this.UpdateAt==null)this.UpdateAt = 0l;
    }
    .
    .
    .
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant