Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7024929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:54:27+00:00 2026-05-27T23:54:27+00:00

My folder/namespace hierarchy: app/models/entities Entities.php people People.php (other models) I followed the instructions per

  • 0

My folder/namespace hierarchy:

  • app/models/entities
    • Entities.php
    • people
      • People.php
      • (other models)

I followed the instructions per this question: lithium fill multiple models from view, but got an error “failed to open stream: No such file or directory in C:\xampp\htdocs\PhiCRM\libraries\lithium\core\Libraries.php on line 468”, which, yea… cuz as you saw above, its nested in another folder, which is indicated in the configs array, shown below

My fix: I changed

public $belongsTo = array(
    'People' => array(
        'class' => '\app\models\entities\people\People',
        'key' => 'person_id',
    ),
);

to

public $belongsTo = array(
    'people\People' => array(
        'class' => '\app\models\entities\people\People',
        'key' => 'person_id',
    ),
);

and now the error goes away (changed the second line, from ‘People’ to ‘people\People’), but now I get the error: ‘Related model class ‘app\models\entities\people\people\People’ not found.’ in C:\xampp\htdocs\PhiCRM\libraries\lithium\data\model\Relationship.php on line 159, so now its tacking on ANOTHER people to the path string.

My question: Is this intended behavior? Shouldn’t the relationships model use the class path I provided in the $configs array instead of string concatenation with the class name? If its a bug, should I report it, and how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:54:27+00:00Added an answer on May 27, 2026 at 11:54 pm
    public $belongsTo = array(
        'People' => array(
            'to' => '\app\models\entities\people\People',
            'key' => 'person_id',
        ),
    );
    

    Should work better with ‘to’ instead of ‘class’ 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

the folder structure is like this: plugin->upload->php->files list-> 'script_url' => $this->getFullUrl().'/'.basename(__FILE__), //'upload_dir' => dirname(__FILE__).'/files/',
A question was asked about whether namespace and folder structure would affect performance of
In my asp.net web app. I have three classes (inside app_code folder) under namespace
I'm trying to retrieve an outlook (2007) folder using something like this: Outlook.NameSpace MAPINameSpace
I'm trying to change a namespace in Visual Studio. My folder structure looks something
My folder at: /usr/local/www/.ext_env_vars has a bunch of files in it that my app
My folder structure is like - root admin create_page.php pages my_page1.php my_page2.php I have
in VS2010 Class Designer is it possible to specify namespace / folder for classes
To compliment an existing smorgasbord of arrangements between phpunit,autoload and namespace is this: I
I have a large web app in vb.net 4.0. Its default namespace is configured

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.