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

Add additional Join test with field actual names and prefixes #834

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

DarkSide666
Copy link
Member

No description provided.

@DarkSide666 DarkSide666 marked this pull request as draft February 25, 2021 21:38
$this->assertEquals(
[
'user' => [
1 => ['id' => 1, 'first_name' => 'John 2', 'cid' => 1],
Copy link
Member

@mvorisek mvorisek Feb 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I belive this is wrong, as actual name should be used for low level SQL only, otherwise field name (not actual name) should be used.

This line should be:

1 => ['id' => 1, 'first_name' => 'John 2', 'contact_id' => 1],

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. This is just direct dump from DB, so there will be actual names here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, but in export and other non-low-level dumps it should not have the actual name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes in import / export should not have actual names.

But as you see in Join class it still will use actual names when linking tables. See I added comment there in this PR.
I don't think we have to change that, but having additional note about that could be good.

@DarkSide666 DarkSide666 marked this pull request as ready for review February 25, 2021 22:32
@DarkSide666 DarkSide666 requested a review from mvorisek February 25, 2021 22:43
Copy link
Member

@mvorisek mvorisek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

join use actual only, but that seems enough for now....

@DarkSide666 DarkSide666 merged commit 9650b49 into develop Feb 25, 2021
@DarkSide666 DarkSide666 deleted the feature/actual-name branch February 25, 2021 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants