Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Duplicate join exception thrown even with tables coming from different schemas/catalogs #244

Open
tenninebt opened this Issue · 1 comment

1 participant

@tenninebt

Here is an example explaining the issue:

When we do the following :

Join("tablename", join =>
{
join.Schema("schema1").Catalog("catalog1");
join.Optional();
join.KeyColumn("somekeycolumn");
});

Join("tablename", join =>
{
join.Schema("schema2").Catalog("catalog2");
join.Optional();
join.KeyColumn("somekeycolumn");
});

Fluent throws an exception :
if (joins.Exists(x => x.TableName == mapping.TableName)
throw new InvalidOperationException("Tried to add join to table '" + mapping.TableName + "' when already added.");

The check should look more like :

if (joins.Exists(x => x.TableName == mapping.TableName && x.Schema == mapping.Schema && x.Catalog == mapping.Catalog))

@tenninebt

Any news please? Someone else faced the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.