Code Monkey home page Code Monkey logo

Comments (8)

koterpillar avatar koterpillar commented on September 26, 2024

You can use
static $belongs_to = array(
array('os_type', 'foreign_key' => 'os_name_id', 'class_name' => 'OsType'),
);
etc.

from php-activerecord.

neverender avatar neverender commented on September 26, 2024

Thanks koterpillar, that works.

from php-activerecord.

neverender avatar neverender commented on September 26, 2024

koterpiller gave me a workaround for this particular model name but I would still consider this a bug. It's still giving me lots of trouble.

from php-activerecord.

neverender avatar neverender commented on September 26, 2024

Hey, this guy in your forums saw this problem too
http://www.phpactiverecord.org/boards/4/topics/36-classify-bug

from php-activerecord.

kla avatar kla commented on September 26, 2024

This fixes it http://github.com/kla/php-activerecord/commit/1483c498946f530da1563e07b6fc70557f60eec7. Please confirm if that works for you.

from php-activerecord.

neverender avatar neverender commented on September 26, 2024

Yeah this fixed Status and OsVersion. I actually have another class called TestPassTestStatus. This fixed the 'Status' part but TestPass was still TestPas. Your fix pointed me in the right direction at least, and I added a line to $singular
'/(ass)$/i' => "$1",
It now works fine. I dont know if that solution will work for everyone, but there you go.

from php-activerecord.

kla avatar kla commented on September 26, 2024

Hey do you mind testing your code against the latest commit? Minus any changes you've made like the '/(ass)$/i' one. I think this should take care of everything.

from php-activerecord.

neverender avatar neverender commented on September 26, 2024

Yeah it looks like it works.

from php-activerecord.

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.