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

Table prefix issue while using relationship #982

Open
robincsamuel opened this issue Feb 1, 2016 · 0 comments
Open

Table prefix issue while using relationship #982

robincsamuel opened this issue Feb 1, 2016 · 0 comments

Comments

@robincsamuel
Copy link

'columns' => array(
        'id',
        'username',
        'full_name' => array(
            'title' => 'Full Name',
            'relationship' => 'profile',
            'select' => "(:table).full_name"
        ),
    )

I'm facing issue with above column full_name. I use table prefix, and the issue is with aliasing.

r_ is my prefix, profiles is the relationship table.

WHERE r_users.id = full_name_r_profiles.user_id AND `r_full_name_r_profiles`.`user_id` is not null

Problem is,
for the first condition it used full_name_r_profiles and after 'AND' r_full_name_r_profiles.

Correct version is full_name_r_profiles.

robincsamuel added a commit to robincsamuel/Laravel-Administrator that referenced this issue Feb 1, 2016
robincsamuel added a commit to robincsamuel/Laravel-Administrator that referenced this issue Feb 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant