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

UserManager.GetRolesAsync(user) Error. #16

Closed
DmitrijOkeanij opened this issue Jan 3, 2019 · 3 comments
Closed

UserManager.GetRolesAsync(user) Error. #16

DmitrijOkeanij opened this issue Jan 3, 2019 · 3 comments

Comments

@DmitrijOkeanij
Copy link

I use default Identity classes.
And this initialization at sturtup. Users and Roles have int id.

.AddLinqToDBStores<int>(dataBaseFactory) 
.AddUserManager<UserManager<User>>()
.AddRoleManager<RoleManager<UserGroup>>()

I tried to

var roles = await userManager.GetRolesAsync(user);

Throw exceprion

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 userRoleINNER JOINAspNetRoles role_1ONuserRole.RoleId=role' at line 4

@DmitrijOkeanij
Copy link
Author

Oh. Sorry. Solved by adding mapping to UserRoles.
But error massage a little strange, and was difficult to understand correlation.

@MaceWindu
Copy link

I think it is the same issue as #15. Bigger problem is that right now we don't have active maintainer for this package...

@MaceWindu
Copy link

Message is strange, because linq2db failed to escape table name identifier. Otherwise it should have complained about unknown table userroles`1. I will create issue for linq2db

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

No branches or pull requests

2 participants