Ticket #797 (closed Bug: fixed)

Opened 3 months ago

Last modified 3 months ago

Orm Factory Is Incorrect after r3366

Reported by: Zoxive Owned by: Shadowhand
Priority: major Milestone: 2.3
Component: Libraries:ORM Version: SVN HEAD
Keywords: Cc:

Description

r3366

/**
* Creates and returns a new model.
*
* @chainable
* @param   string  model name
* @param   mixed   parameter for find()
* @return  ORM
*/
 public static function factory($model, $id = NULL)
{
	// Set class name
	$model = ucfirst($model).'_Model';
	return new $model($id);
}
$model = 'Model_'.ucfirst($model);

Only thing now is, models can be in sub-directory's also. So the user will have to pass ORM::factory('Blog_Blogposts'); to get Model_Blog_Blogposts.

Which is located in classes/model/blog/blogposts.php

Change History

Changed 3 months ago by Zoxive

  • component changed from Core to Libraries:ORM

Changed 3 months ago by Shadowhand

  • status changed from new to accepted

Changed 3 months ago by Shadowhand

  • status changed from accepted to closed
  • resolution set to fixed

Fixed in r3379.

Note: See TracTickets for help on using tickets.