Hi,
We have the following entities:
-Account:
*Id - Guid
*Data - String
-Logins:
*Id - Guid
*AccountId - Guid
*Sucess - bool
It's not strctly like this but it's enough for explanation of the error. I'm creating like this (Accounts is abstract for several entities):
Create var of accountType (it insert alone correctly and same for login, but when inserting then in same context it throws errors).
var login = new Login() { Id = Guid.NewGuid(), Time = DateTime.Now, IP = "0.0.0.0" };
login.Account = accountType1;
context.Logins.InsertOnSubmit(login);
context.SubmitChanges();
It throws error Unmapped classmember Account, Logins.
Unmapped Class Member error - One-To-Many Relationship
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Generally, this exception specifies that the mapping provided for your DataContext class has no information about the Account.Logins navigation property. Could you please specify the following:
- the definitions of the Account and Login classes;
- the mapping mode (attribute, file, or fluent) you are using for them;
- the stack trace of the exception.
If possible, please send us a model with which the problem can be reproduced.
- the definitions of the Account and Login classes;
- the mapping mode (attribute, file, or fluent) you are using for them;
- the stack trace of the exception.
If possible, please send us a model with which the problem can be reproduced.