'Subquery returned more than 1 value' problem in EntityFramework

Posted by plotnick on Stack Overflow See other posts from Stack Overflow or by plotnick
Published on 2010-05-13T19:24:11Z Indexed on 2010/05/13 20:24 UTC
Read the original article Hit count: 132

Filed under:

I have one 'Transaction' entity object with 'Operations' navproperty with multiplicity of 'Many'.

When I'm adding only one operation per transaction nothing happens, but when I'm trying to add more than one operation, db.SaveChanges() throws an exception like 'Subquery returned more than 1 value blah, blah, blah'

How can I solve that? Help me guys please...

BTW... Could you tell me how can I see the exact query string that EF passes to Sql Server on db.SaveChanges() method?

© Stack Overflow or respective owner

Related posts about entity-framework