you can use an in-memory DB for that On Wed, Sep 10, 2008 at 10:12 AM, Marc Climent <[EMAIL PROTECTED]>wrote:
> > Ok, it's my fault. > > The property that I was using to filter is not mapped, but exists in > that class. If I make a .ToList() to commit the query, proxies are > created and all the properties are accessible, but if I use delayed > execution, the column, obviously, must exist in the database in order > to let NHibernate build the query. > > I was thinking that the problem was NHLinq because was the only thing > I changed. > > As I could not find this error unit testing, because with mocking I > get "real" objects that have all the properties (mapped or not), how > can I "fake" a NHibernate respository that actually works like if > there was a database but in memory? > > On 9 sep, 23:02, "Tuna Toksöz" <[EMAIL PROTECTED]> wrote: > > Can you give a testcase for that? > > > > > > > > > > > > On Tue, Sep 9, 2008 at 6:19 PM, Marc Climent <[EMAIL PROTECTED]> > wrote: > > > > > I was playing with NHLinq and I extended my generic Repository to > > > return some IQueryables instead of ILists to take advantage of delayed > > > execution. Then, I made the same with the Services layer, returning > > > IEnumerables instead of ILists. I'm not sure if this is a good > > > decision, but I'm just testing... > > > > > Unit testing seemed to work and I have prepared a small web project. > > > Now, if I use the old IList methods everything works as expected but > > > when using IEnumerables, a nice QueryException "could not resolve > > > property: ProperyName of: ClassName" is thrown. > > > > > I don't know exactly why this happens... can someone give me a clue? > > > > -- > > Tuna Toksöz > > > > Typos included to enhance the readers attention!- Ocultar texto de la > cita - > > > > - Mostrar texto de la cita - > > > -- Ken Egozi. http://www.kenegozi.com/blog http://www.musicglue.com http://www.castleproject.org http://www.gotfriends.co.il --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
