Re: sql generation for oracle

From: Chuck Hill (chil..lobal-village.net)
Date: Thu Oct 02 2008 - 17:39:26 EDT

  • Next message: D Tim Cummings: "Re: WOMiddleManDeclarationFormatException: no declaration named EntityNameConditional"

    On Oct 2, 2008, at 2:29 PM, Mike Schrag wrote:

    >> So Oracle has this 30 character limit on identifiers, which is
    >> often exceeded when doing SQL generation from Entity Modeler for
    >> foreign key constraints.
    >>
    >> Having not looked at the source, how hard would it be to truncate
    >> these to a unique value <=30 chars when dealing with Oracle?
    >> (Assuming you don't really care what the name looks like.)
    > Funny, I was just talking to a coworker about this same thing ...
    > since ... i will be using Oracle ... soon ... and I blame you for
    > this.

    It is bad. SQL Server is worse. Maybe. Welcome to 1982.

    > I was trying to decide if it should be done in the OraclePlugIn or
    > in WOLips. I'd almost like the OraclePlugIn to do name mangling
    > automagically, which would allow you to have a "pure" model that
    > could move between dbs. Actually, maybe we could do it in Wonder
    > during model loading ... You could set a
    > [ModelName].maxColumnLength=30 and it could do name mangling.
    > Ultimately, though it would probably be less "tricky" to make it
    > happen in WOLips (and you wouldn't have to worry about coming up
    > with a persistent mangling scheme).

    I am sure that I did this a few years ago, maybe for Postgres? It is
    kind of vague. I do recall that I did it in the plugin, FWIW.

    Chuck

    -- 
    Chuck Hill             Senior Consultant / VP Development
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Thu Oct 02 2008 - 17:40:06 EDT