GithubHelp home page GithubHelp logo

josegonzalez / cakephp-entity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kanshin/cakeentity

29.0 8.0 11.0 596 KB

CakePHP2: Unmaintained Table/Entity wrapper around old Model system

License: MIT License

PHP 100.00%

cakephp-entity's People

Contributors

basuke avatar eberfreitas avatar jameswatts avatar josegonzalez avatar zoghal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cakephp-entity's Issues

Update packagist

Hello there,

I see in the repo that there were many releases (3.0.0 being the latest) since 1.0.0 and I was wondering if packagist could be updated accordingly. I would like to freeze the version of the library to a specific one and not be tied to a dev-master branch just in case of anything changes in the future.

Is there any chance this could be done??

what version of php is must support?

hi
in readme say requirement to php 5.3 but short array and JsonSerializable as of php 5.4.

if your target is 5.3 , i change and downgrade to 5.3 , send pull request?

Deprecated?

Hello!

The headline on this repo home page says:
CakePHP2: Deprecated Table/Entity wrapper around old Model system

Is it "deprecated" because something else for Cake 2 has replaced this? Or because Cake3 is out?

find('threaded')

Although the documentation says by default the find still returns array,
When I extended my models from Table, it's by default returning entities.
The only problem with this is that:
When I try a find('threaded') it return erros:

Warning (4096): Argument 1 passed to Hash::get() must be of the type array, object given, called in /var/www/html/sabhio/lib/Cake/Utility/Hash.php on line 982 and defined [CORE/Cake/Utility/Hash.php, line 43]
Warning (4096): Argument 1 passed to Hash::get() must be of the type array, object given, called in /var/www/html/sabhio/lib/Cake/Utility/Hash.php on line 983 and defined [CORE/Cake/Utility/Hash.php, line 43]
Warning (2): array_merge() [function.array-merge]: Argument #1 is not an array [CORE/Cake/Utility/Hash.php, line 988]

Table::convertToEntity limits to use id key

In Table::convertToEntity there is a a check on a set id field

if (is_null($data) || empty($data[$this->alias]['id'])) {

My sight in this plugin isn't deep enough to understand if this limitation is needed, but if we change this to

if (is_null($data) || empty($data[$this->alias][$this->primaryKey])) {

this works in first short tests and we don't have to change our models to use id fields

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.