I have an UserEntity that mapped like and got Cannot simultaneously fetch multiple bags. error
public UserEntityMap : ClassMap<UserEntity>
{
//Other properties
HasMany(x => x.Addresses).KeyColumn("User_id").Fetch.Join();
HasMany(x => x.Roles).KeyColumn("User_id").Fetch.Join();
}
I want to get both addresses and roles when i create a query for userentity. What should i do to see an output like
Select * from UserEntity u
join Addresses a on u.id=a.User_id
join Roles r on u.id=r.User_id where u.id=?