This question is locked. New answers and comments are not allowed.
I'm just getting started with OpenAccess ORM and I have a beginners question:
I have 2 entities Book and Page that have a 0..1 - * relationship, so a Book can contain many Pages, and a Page can be part of 1 Book, or not be in a Book. Page has a property BookId that serves as the foreign key to the primary key column of Book.
If I create an instance of Page, and don't provide it with a Book object, when saving changes to the database I get a constraint violated exception: page.book_id may not be NULL
How should I model this so that I can have a Page without a Book? (e.g. keep Page.Book as null)
I have 2 entities Book and Page that have a 0..1 - * relationship, so a Book can contain many Pages, and a Page can be part of 1 Book, or not be in a Book. Page has a property BookId that serves as the foreign key to the primary key column of Book.
If I create an instance of Page, and don't provide it with a Book object, when saving changes to the database I get a constraint violated exception: page.book_id may not be NULL
How should I model this so that I can have a Page without a Book? (e.g. keep Page.Book as null)