Tuesday, November 1, 2011

a letter a wrote (on LinqSpec)

Hi Jorge,
I can think of a refinement I need to make when I am in this morning. I believe the reason three tests I had around PM/PC/AM for ProgramOfferings started to fail is that I am using one LinqSpec for matching both a ProgramOffering on both ProgramPlan Id and Program Id. There is a spec with a firstcollection.Contains(ProgramPlan) || secondcollection.Comtains(Program) shape and if the first collection is empty I think it sabotages the second.

If it seems inappropriate for me to shove these two concerns into one spec, I would agree that it is. An NHibernate error is thrown when I try to use two separate specs for each concern in tandem as a query NHibernate cannot manage is crafted. I am thus trying to work around the problem.

I think I can solve the problem by making a union of firstcollection and secondcollection above and using the union collection in place of the two collections in the LinqSpec specification.

Let's talk today if it's OK, albeit I'm not sure what to do about our LinqSpec w/ NHibernate challenges. :(

Waiting to carpool with Bhavani now. Should be in soon.

Thanks,
Tom


Sent from my iPhone

No comments:

Post a Comment