Big problem with fluent nhibernate, c# and MySQL need to search in BLOB
Posted
by VinnyG
on Stack Overflow
See other posts from Stack Overflow
or by VinnyG
Published on 2010-04-19T20:41:27Z
Indexed on
2010/04/19
20:43 UTC
Read the original article
Hit count: 230
I've done a big mistake, now I have to find a solution. It was my first project working with fluent nhibernate, I mapped an object this way :
public PosteCandidateMap()
{
Id(x => x.Id);
Map(x => x.Candidate);
Map(x => x.Status);
Map(x => x.Poste);
Map(x => x.MatchPossibility);
Map(x => x.ModificationDate);
}
So the whole Poste object is in the database but I would have need only the PosteId. Now I got to find all Candidates for one Poste so when I look in my repository I have :
return GetAll().Where(x => x.Poste.Id == id).ToList();
But this is very slow since it loads all the items, we now have more than 1500 items in the table, at first to project was not supposed to be that big (not a big paycheck either). Now I'm trying to do this with criterion ou Linq but it's not working since my Poste is in a BLOB.
Is there anyway I can change this easyly?
Thanks a lot for the help!
© Stack Overflow or respective owner