Denny wrote:
> On Tue, 2009-05-26 at 09:21 +0100, Chris Cole wrote:
>> The problem seems to be that the current schema is a DBIx::Class::Schema
>> object, but in order to update it needs to be a
>> DBIx::Class::Schema::Loader object. I can modify the base class to be a
>> Loader object, but then the it barfs because the md5sums are different.
>>
>> I seem to be in a catch22. (I think) I need to change the files in order
>> to update them, but changing them stops them being updated. Help!
> 
> Ah, I think you've hit the same mistake as me when I started - you're
> trying to generate the DB modules using your main DB module as the
> starting point?

Yes. That's right.

> Write a separate script which generates them instead - then it doesn't
> need to write over itself.

Except, I do want to overwrite them. The comments in the modules suggest
adding your code below a certain point in order to retain it during
regeneration.

If I use a separate script to create them, I'll lose my additional code.
Won't I?

> I can send you an example of how I did it if you want, just mail me
> off-list.

Yes, please. That would be great.
Thanks.


_______________________________________________
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]

Reply via email to