[Dbix-class] Problem with DBIC::PK::Auto::Oracle and composite
blblack at gmail.com
Tue Jan 3 20:40:38 CET 2006
On 1/3/06, James FitzGibbon <jfitzgibbon at primustel.ca> wrote:
> A cursory examination of the Oracle docs doesn't suggest a place in the
> dictionary that lets you see a normalized view of the triggering events.
> So, I figure that the solution is one of:
> - change my trigger auto-generation to create separate triggers (or at least
> separate triggers for sequence creation
> - modify PK::Auto::Oracle to use "LIKE '%INSERT%'" instead of "= 'INSERT'"
> to find the trigger body (either in the proper dist, or if this is a "just
> me" thing, a private subclass that overrides _get_autoinc_seq)
> Any thoughts?
I would split those triggers up, unless there's a good reason not to.
If you have a bunch of huge "INSERT OR UPDATE OR DELETE" triggers, and
they all have a top-level switch that says "IF INSERTING ... IF
UPDATING ...", then it seems they'd be better off (cleaner) as
seperate triggers anyways.
The PK::Auto code for most backends will probably always be a bit
heuristic in nature, and there will probably always be odd cases that
it cannot figure out without hints from you. I think perhaps the most
productive change to PK::Auto and friends would be to make it easier
and more obvious for you to override _get_autoinc_seq logic for your
particular database class as a whole (as opposed to per-table).
Just my $0.02,
More information about the Dbix-class