On Fri, Apr 30, 2010 at 09:57:11AM +0200, Miquel Ruiz wrote: > Just to try to solve it in the testing code, i have moved the > subclasses' extra columns to the parent class, but it is still not working: > > Just to make it clearer: the 'deleted' column which the error is > complaining about is not part of the app model, it is the 'deleted' > column needed by Preview to work.
Right. Following you. DynamicSubclass isn't something I've ever used directly - it's basically a cookbook recipe turned into a module and in my experience your needs tend to rapidly hit the point where you're better off handling the rebless dance yourself. However, this should still work. So. You're going to want to break stuff out into stages - first, get out of Catalyst code and write yourself a t/ file for your app so once this does work you can't accidentally break it again. Second, that file should do new_result, then insert directly rather than using create(). Third, once you've got that split you can see specifically what blows up. Then you can start dumping $obj->result_source where $obj is either an rs or a row to see which source you've ended up with where and why there's a problem. If you can have a go at the above and then once you get stuck again post your results we can chat about what those results mean and how to debug this further. Thanks very much for playing along so far - I'm aware it can be a trifle frustrating but we -are- getting somewhere, albeit not as quickly as we might have liked. -- Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue http://shadowcat.co.uk/blog/matt-s-trout/ http://twitter.com/shadowcat_mst/ Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst commercial support, training and consultancy packages could help your team. _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
