Skip to content

Cannot set one-to-many collection key if it matches many-to-many default using bycode. #2364

@markdchurchill

Description

@markdchurchill

So I've got an interesting situation switching from inverse false -> true on an existing database. This means adding in Child.Parent property mapped to the existing "parent_key" column - and surprisingly it fails.

This gist covers the details.

I think the issue is here. We refuse to set the column name if it matches the default many-to-many case (ownerentityname_key), but in the case of a one-to-many relationship the default is actually OwnerEntity(?) and this setting would be a valid override.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions