[Dbix-class] Case sensitivity in column names using Oracle

Michael Gray mjg17 at eng.cam.ac.uk
Mon Feb 13 17:19:10 CET 2006


On Mon, 13 Feb 2006, Matt S Trout wrote:

> On Mon, Feb 13, 2006 at 03:02:33PM +0000, Michael Gray wrote:
> > 
> > It's possible to work around this by specifying upper-case names to 
> > add_columns() in my schema class, but this results in upper-case 
> > accessors and is going to be a right pain (not to mention ugly) in my 
> > application.
> 
> __PACKAGE__->add_columns(Foo => { accessor => 'foo' }, ...);
> 
> should provide a workaround.

Thanks - that provides a partial workaround but I'm still left with 
needing uppercase in:

 $resultset->create(
        SELECTION_SET_ID => $selection_set_id,
	MOD_OFFERING_ID  => $mod_off_id
 );

where my accesors are now selection_set_id() and mod_offering_id().

> > I'd like to do something more systematic, possibly doing case conversion 
> > in ResultSource::column_info() or Storage::DBI::columns_info_for(), but 
> > I'm not sure where would be best, nor how to toggle the behaviour in a 
> > DBIx::Class approved fashion.
> 
> I guess $source->column_info should handle the DWIMery. As to how to do this
> in the most portable possible fashion, I'm not sure - does anybody know if
> there are any databases that'll let you have foo, Foo and FOO all as column
> names on the same table? (I used to believe this sort of insanity never
> happened. then I released DBIC :)

There probably are :-( .  I'm happy to hack, but will wait a bit to see 
if there's any more feedback on this point.

-- 
Michael



More information about the Dbix-class mailing list