{"action":"created","issue":{"url":"https://api.github.com/repos/j4mie/paris/issues/116","labels_url":"https://api.github.com/repos/j4mie/paris/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/j4mie/paris/issues/116/comments","events_url":"https://api.github.com/repos/j4mie/paris/issues/116/events","html_url":"https://github.com/j4mie/paris/issues/116","id":108603977,"number":116,"title":"MyModel extends Model outputs Fatal error: Class 'MyModel' not found in vendor/j4mie/paris/paris.php on line 121","user":{"login":"nmpribeiro","id":414938,"avatar_url":"https://avatars.githubusercontent.com/u/414938?v=3","gravatar_id":"","url":"https://api.github.com/users/nmpribeiro","html_url":"https://github.com/nmpribeiro","followers_url":"https://api.github.com/users/nmpribeiro/followers","following_url":"https://api.github.com/users/nmpribeiro/following{/other_user}","gists_url":"https://api.github.com/users/nmpribeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/nmpribeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmpribeiro/subscriptions","organizations_url":"https://api.github.com/users/nmpribeiro/orgs","repos_url":"https://api.github.com/users/nmpribeiro/repos","events_url":"https://api.github.com/users/nmpribeiro/events{/privacy}","received_events_url":"https://api.github.com/users/nmpribeiro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-28T07:43:51Z","updated_at":"2015-09-28T08:05:50Z","closed_at":"2015-09-28T08:05:50Z","body":"Hi there, I'm not undestanding how to make MyModel available to the ORM...\r\n\r\n Fatal error: Class 'MyModel ' not found in vendor/j4mie/paris/paris.php on line 121\r\n\r\n<?php namespace MyApp\\Model;\r\n\r\nclass MyModel extends \\Model\r\n{\r\n  \r\n}\r\n\r\nIn HomeController, I've asked to use MyModel instead of ORM's Model:\r\nuse MyApp\\Model\\MyModel;\r\n\r\nand in the indexAction:\r\n$mymodel = MyModel::factory('MyModel')->order_by_desc('timestamp')->find_many();\r\n\r\nI can get it to work if I don't use namespaces, so the namespace 'MyApp\\Models\\' need to be thrown at the ORM (wraper?). But I'm not sure about it. Any help would be great\r\n\r\nThanks in advance"},"comment":{"url":"https://api.github.com/repos/j4mie/paris/issues/comments/143665706","html_url":"https://github.com/j4mie/paris/issues/116#issuecomment-143665706","issue_url":"https://api.github.com/repos/j4mie/paris/issues/116","id":143665706,"user":{"login":"nmpribeiro","id":414938,"avatar_url":"https://avatars.githubusercontent.com/u/414938?v=3","gravatar_id":"","url":"https://api.github.com/users/nmpribeiro","html_url":"https://github.com/nmpribeiro","followers_url":"https://api.github.com/users/nmpribeiro/followers","following_url":"https://api.github.com/users/nmpribeiro/following{/other_user}","gists_url":"https://api.github.com/users/nmpribeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/nmpribeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmpribeiro/subscriptions","organizations_url":"https://api.github.com/users/nmpribeiro/orgs","repos_url":"https://api.github.com/users/nmpribeiro/repos","events_url":"https://api.github.com/users/nmpribeiro/events{/privacy}","received_events_url":"https://api.github.com/users/nmpribeiro/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T08:05:50Z","updated_at":"2015-09-28T08:05:50Z","body":"<?php namespace MyApp\\Model;\r\n\r\nclass MyModel extends \\Model\r\n{\r\n  public static $_table = 'myapp_mymodels';\r\n}\r\n\r\nThis might be handy for anyone else"}}