Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Schema::Result file question

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


ksmclane at us

Apr 30, 2012, 1:10 PM

Post #1 of 2 (134 views)
Permalink
Schema::Result file question

I have this statement in each result file for ny DB. I am currently
accessing a other than default schema on a DB2 server, which has no way to
set a different schema as default for a user.

__PACKAGE__->table("ACCOUNT_DETAILS");


To get my data out of the DB, I have been forced to change this to

__PACKAGE__->table("HCDB_TEST.ACCOUNT_DETAILS");

Specifying the schema. Unfortunately, anytime I need to re-create my model
all these edits will go away. I do not want to edit 52+ files everytime I
need to reload.

My question is, is there a way to have the string "HCDB_TEST>" prepended
when making a call to any model?

Whet would it look like and where should it be put?

Can I re-define the table below the "Do Not edit" line? Or would it be
better to add something more global in nature?


bobtfish at bobtfish

Apr 30, 2012, 3:01 PM

Post #2 of 2 (123 views)
Permalink
Re: Schema::Result file question [In reply to]

On 30 Apr 2012, at 21:10, Kenneth S Mclane wrote:
>
> Can I re-define the table below the "Do Not edit" line?

Yes, you can and that should work fine as a hack.

> Or would it be better to add something more global in nature?

You'd be much better asking the DBIC folks (on the DBIC list) about this however, they're likely to be much more clueful :)

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.