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

@Embedded class fields are considered NotNull #38

Open
buggins opened this issue Sep 16, 2016 · 0 comments
Open

@Embedded class fields are considered NotNull #38

buggins opened this issue Sep 16, 2016 · 0 comments
Assignees
Labels

Comments

@buggins
Copy link
Owner

buggins commented Sep 16, 2016

class Customer {
    int id;
    string name;
    // Embedded is inferred from type of Address
    Address address;
    this() {
        address = new Address();
    }
}

@Embeddable
class Address {
    string zip;
    string city;
}

If zip is not set, it's impossible to save object
Customer c10 = new Customer();
c10.name = "Customer 10";
sess.save(c10);
Fails on NotNull check for address.zip

@buggins buggins added the bug label Sep 16, 2016
@buggins buggins self-assigned this Sep 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant