Skip to content

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

Merged
DarkSide666 merged 2 commits intodevelopfrom
feature/actual-name
Feb 25, 2021
Merged

Add additional Join test with field actual names and prefixes#834
DarkSide666 merged 2 commits intodevelopfrom
feature/actual-name

Conversation

@DarkSide666
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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