Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Table::convertToEntity limits to use id key #8

Closed
simonberger opened this issue Apr 4, 2014 · 3 comments
Closed

Table::convertToEntity limits to use id key #8

simonberger opened this issue Apr 4, 2014 · 3 comments

Comments

@simonberger
Copy link

In Table::convertToEntity there is a a check on a set id field

if (is_null($data) || empty($data[$this->alias]['id'])) {

My sight in this plugin isn't deep enough to understand if this limitation is needed, but if we change this to

if (is_null($data) || empty($data[$this->alias][$this->primaryKey])) {

this works in first short tests and we don't have to change our models to use id fields

@josegonzalez
Copy link
Owner

Thanks for the bug report!

@josegonzalez
Copy link
Owner

How are you liking/disliking these changes so far? Anything missing from this plugin that you think we should add?

@simonberger
Copy link
Author

Thank you for the fast reaction and confirmation of my assumption!

At the moment we are happy with the functionality of your plugin. I'll post here again if we find anything that could be needed or should be fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants