In the function DbMetal.Generator.Implementation.ValidateAssociations,
there are two lines:

var otherAssociation    = otherType.Associations.Single(a => a.Type ==
table.Type.Name && a.ThisKey == association.OtherKey);
var otherColumn         = otherType.Columns.Single(c => c.Member ==
association.OtherKey);

What exactly is this code trying to check?  What I am finding most
interesting is that otherAssociation and otherColumn are never used.
Is the sole purpose to throw an exception if there isn't one and only
one association and column?  If that is the case, why isn't there any
logging around it.

It was throwing an exception with my Interbase DB.  After tweaking the
code to log an error, I discovered one table that had two identical
associations, same PK and FK.  Is that what this code is looking for?
If so, I would be happy to submit my tweaks.

Sam

-- 
You received this message because you are subscribed to the Google Groups 
"DbLinq" 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/dblinq?hl=en.

Reply via email to