Skip to content

phalcon-graphql/src/PhalconGraphQL/Traits/ModelQueryTrait.php #2

Description

@fvromera

Hi guys,

May be, this line (27) are better in the next way:

return $modelInstance->getModelsMetaData()->getIdentityField($modelInstance) ?: implode(',', $modelInstance->getModelsMetaData()->getPrimaryKeyAttributes($modelInstance));

Because, now this not function in the next cases:

  1. You can have a primary key field that is not identity field (if this is not autoincrement field) and it's name not is "id"
  2. If you have a primary key composed by multiple fields

P.D. Sorry for my english :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions