Giter Club home page Giter Club logo

Comments (10)

weotch avatar weotch commented on July 30, 2024 1

@noxify Yeah, works for me, thanks for looking into it.

The issue is that only postgres doesn't use CONCAT

from decoy.

weotch avatar weotch commented on July 30, 2024

What database and version are you using?

from decoy.

eminos avatar eminos commented on July 30, 2024

mysql 5.7

from decoy.

weotch avatar weotch commented on July 30, 2024

From https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html

The ONLY_FULL_GROUP_BY and STRICT_TRANS_TABLES modes were added in MySQL 5.7.5.

We're running 5.6 here, which is why we haven't encountered this.


I added a commit to master, can you see if dev-master fixes it for you?

from decoy.

eminos avatar eminos commented on July 30, 2024

Yea, that solved it. Thanks :)

from decoy.

noxify avatar noxify commented on July 30, 2024

The same problem occurs with postgres (9.6.10) :)

from decoy.

weotch avatar weotch commented on July 30, 2024

@noxify Did the master branch fix? We're gonna tag a new release soon

from decoy.

noxify avatar noxify commented on July 30, 2024

@weotch i used the "composer require ..." from the docs - I will change it and test it again.

Thanks for the hint :)

from decoy.

noxify avatar noxify commented on July 30, 2024

@weotch - tested it with postgres and mysql5.6, but with both databases I got the following error:

Method Bkwld\Decoy\Fields\Listing::__toString() must not throw an exception, caught ErrorException: SQLSTATE[42000]: Syntax error or access violation: 1055 'decoy.admins.id' isn't in GROUP BY (SQL: select admins.id, CONCAT(first_name, " ", last_name) name from `changes` inner join `admins` on `admins`.`id` = `admin_id` group by `admin_id`) (View: /Applications/MAMP/htdocs/decoy/vendor/bkwld/decoy/views/shared/list/_full_header.haml)
  • OSX
  • MAMP with PHP7.1
  • mysql 5.6
  • postgres 9.6.10

composer.json:

"require": {
        "php": ">=5.6.4",
        "bkwld/decoy": "dev-master",
        "laravel/framework": "5.4.*", //5.4.19
        "laravel/tinker": "~1.0"
    },

from decoy.

noxify avatar noxify commented on July 30, 2024

I changed the getAdmins() method to the following:

    public static function getAdmins()
    {
        return Admin::all(['id', 'email'])->pluck('email', 'id');
    }

and everything works fine :)

If i'm not wrong, the getAdmins() will be used to show the values for the search dropdown.
Does it not make sense to show all admins without the limitation?

from decoy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.