Re: [Dbix-class] Features comparison among ORMS?

2013-11-11 Thread Rob Kinyon
What sort of features are you looking for? All the Perl ORMs wrap DBI, so connecting to different databases isn't a problem. Among the Perl ORMs, only DBIx::Class has resultsets, arguably the most powerful ORM concept. (It's not just among Perl ORMs - I don't know of any other ORM that has

Re: [Dbix-class] Dumping fixtures and loading in test script

2013-11-11 Thread Adam Witney
Hi Rob, Thanks again for your help. The problem I am having is working out how to put it all together. The documentation often contains snippets of code, but not a full (short) script, which would help when trying to see how it all works together. So with the ::Sims module, does each test

Re: [Dbix-class] Dumping fixtures and loading in test script

2013-11-11 Thread Rob Kinyon
Adam - Each test sets up the database exactly as it wants. In general, I do something like: $schema-deploy({ add_drop_table = 1, }); $schema-load_sims( $spec ); in each one of my test scripts that use the Sims. Presumably, I'm working in some in-memory SQLite database or a scratch MySQL

Re: [Dbix-class] Dumping fixtures and loading in test script

2013-11-11 Thread Adam Witney
Thanks again for your email Rob, Just to clarify from looking at the docs again, I would have to edit all my Result classes to add sim information, right? Wouldn't this break every time I refreshed the schema from the database (./script/xxx_create.pl model DB ... etc)? Thanks again adam

Re: [Dbix-class] Dumping fixtures and loading in test script

2013-11-11 Thread Rob Kinyon
On Mon, Nov 11, 2013 at 10:48 AM, Adam Witney awit...@sgul.ac.uk wrote: Thanks again for your email Rob, Just to clarify from looking at the docs again, I would have to edit all my Result classes to add sim information, right? Wouldn't this break every time I refreshed the schema from the

Re: [Dbix-class] Dumping fixtures and loading in test script

2013-11-11 Thread Adam Witney
On 11 Nov 2013, at 16:05, Rob Kinyon rob.kin...@gmail.com wrote: On Mon, Nov 11, 2013 at 10:48 AM, Adam Witney awit...@sgul.ac.uk wrote: Thanks again for your email Rob, Just to clarify from looking at the docs again, I would have to edit all my Result classes to add sim information,

Re: [Dbix-class] Dumping fixtures and loading in test script

2013-11-11 Thread Rob Kinyon
On Mon, Nov 11, 2013 at 2:22 PM, Adam Witney awit...@sgul.ac.uk wrote: On 11 Nov 2013, at 16:05, Rob Kinyon rob.kin...@gmail.com wrote: On Mon, Nov 11, 2013 at 10:48 AM, Adam Witney awit...@sgul.ac.uk wrote: Thanks again for your email Rob, Just to clarify from looking at the docs again,

Re: [Dbix-class] Dumping fixtures and loading in test script

2013-11-11 Thread Adam Witney
That's an interesting point of view. I tend to make my database changes directly with SQL and when I am ready regenerate the schema files from there. This makes for poor testability. Otherwise, when you have a schema change, you either: 1. Force everyone sharing the same developer

[Dbix-class] best way to share schema elements?

2013-11-11 Thread Seth Daniel
If I want to share schema definitions, across tables, using DBIx::Class what is the best way to do this? I've looked at DBIx::Class::DynamicSubclass, DBIx::Class::Helper::Row::SubClass, and the examples in DBIx::Class::Manual::Cookbook (in the section 'Static sub-classing DBIx::Class result

Re: [Dbix-class] best way to share schema elements?

2013-11-11 Thread Charlie Garrison
Good afternoon, I'll open with disclaimer that I don't really know the answer, but I asked the same question about 6 weeks ago with a new project (with lots of similar components to an old project), and I muddled through to answer it myself. I'll share my solution, and hope for more feedback

Re: [Dbix-class] Features comparison among ORMS?

2013-11-11 Thread Octavian Rasnita
Hi Rob, From: Rob Kinyon rob.kin...@gmail.com What sort of features are you looking for? All the Perl ORMs wrap DBI, so connecting to different databases isn't a problem. Among the Perl ORMs, only DBIx::Class has resultsets, arguably the most powerful ORM concept. (It's not just among Perl