Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getOne behaviour changes with Criteria #112

ricardo-lewis opened this issue Mar 10, 2017 · 0 comments


Copy link

commented Mar 10, 2017

$xpdoObject->getOne is promoted as

Gets an object related to this instance by a foreign key relationship

However if you supply a Criteria or Query as the second parameter, that default behaviour is lost unless you manually specify the relationship in the criteria.

I feel that getOne should always enforce the foreign key relationship. This would mean the criteria parameter would automatically have the foreign key added to it. The criteria parameter should always be additive and not entirely forget the relationship previously specified in the XML schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.