Skip to content

New issue targetKey not working as expected  #4269

Closed

Description

@peze

i want to use the One-To-One associations like that

serviceType.belongsTo(orderRecord, { targetKey: 'service_id',foreignKey:'service_id',constraints: false });
    orderRecord.hasOne(serviceType, { foreignKey: 'service_id' });
    orderRecord.findAll({
        include: [{
            model: serviceType
        }]
    })

as you see ,i have use the targetKey in belongsTo,but it doesn't work ,the OrderRecord still use it's primary key.... im very cofused...how to deal with it?

Activity

  1. janmeier commented on Aug 6, 2015

    @janmeier
    Member

    Merged into #4258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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