{"id":3245,"date":"2014-02-25T10:57:10","date_gmt":"2014-02-25T09:57:10","guid":{"rendered":"http:\/\/www.jude.hanlon.co.uk\/blog\/?p=3245"},"modified":"2014-02-25T10:57:10","modified_gmt":"2014-02-25T09:57:10","slug":"not-able-to-find-class-in-onetomany-relationship-laravel4","status":"publish","type":"post","link":"http:\/\/www.jude.hanlon.co.uk\/blog\/?p=3245","title":{"rendered":"not able to find class in oneToMany relationship (laravel4)"},"content":{"rendered":"<p>My first problem at work today was related to name spaces. Something that worked yesterday before I ran automated API tests wasn&#8217;t working: I have a Candidate\/CandidateAddress relationship where one Candidate may have multiple addresses. For some reason, even though everything is namespaced, I was getting &#8220;Class CandidateAddress not found&#8221;.<\/p>\n<p>This is a really helpful tip, but a misleadingly expansive title: https:\/\/coderwall.com\/p\/nhwq8w<br \/>\n&#8230;and didn&#8217;t do the magic<\/p>\n<p>Whereas the answer to this: http:\/\/stackoverflow.com\/questions\/19731097\/class-comment-not-found-laravel-4\/19732415#19732415<\/p>\n<p>&#8230;actually solved my problem.<\/p>\n<p>It&#8217;s not as neat as I&#8217;d like, but it works.<br \/>\n(apologies tot he non-techies who will see this through FB &#8211; when I&#8221;m not at work I will fix IFTTT to not post notes-to-self)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My first problem at work today was related to name spaces. Something that worked yesterday before I ran automated API tests wasn&#8217;t working: I have a Candidate\/CandidateAddress relationship where one Candidate may have multiple addresses. For some reason, even though &hellip; <a href=\"http:\/\/www.jude.hanlon.co.uk\/blog\/?p=3245\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,5],"tags":[],"class_list":["post-3245","post","type-post","status-publish","format-standard","hentry","category-note-to-self","category-work-related-stuff"],"_links":{"self":[{"href":"http:\/\/www.jude.hanlon.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.jude.hanlon.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jude.hanlon.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jude.hanlon.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jude.hanlon.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3245"}],"version-history":[{"count":2,"href":"http:\/\/www.jude.hanlon.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3245\/revisions"}],"predecessor-version":[{"id":3247,"href":"http:\/\/www.jude.hanlon.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3245\/revisions\/3247"}],"wp:attachment":[{"href":"http:\/\/www.jude.hanlon.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jude.hanlon.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3245"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jude.hanlon.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}