Re: quoted values in entity modeler

From: Chuck Hill (chil..lobal-village.net)
Date: Fri Nov 28 2008 - 13:26:30 EST

  • Next message: Alan Zebchuk: "Adding a revision number to Info.plist"

    On Nov 27, 2008, at 11:48 PM, Anders Peterson wrote:

    > The database is a Sybase ASA which is largely compatible with Sybase
    > ASE and even MS SQL Server.
    >
    > I use com.webobjects.jdbcadaptor.SybasePlugIn and
    > com.sybase.jdbc2.jdbc.SybDriver (jConnect).
    >
    > If I explicitly write "precison" in Entity Modeler it gets written
    > as "\"precision\"" in the plist - and this works. I just don't think
    > I should have to do this.

    I agree.

    > Are you saying that with other EOF plugins this is not a problem?

    With _some_ of them.

    > Never knew. For years I worked around these kind of problems by
    > avoiding some names and/or qouting names in Entity Modeler.

    If you look at Wonder you can see how to extend (fix) Apple's. You
    will need to modify SybasePlugIn.SybaseExpression and add a method
    like this:

    public String externalNameQuoteCharacter() {
            return "\"";
    }

    I think that should take care of it. BUT then "precision" will get
    sent as ""precsion"" so you will need to update your models.

    Chuck

    > Chuck Hill wrote:
    >>
    >> On Nov 27, 2008, at 1:48 AM, Anders Peterson wrote:
    >>
    >>> Hi all,
    >>>
    >>> I sometimes get problems with unfortunate column names when
    >>> querying the database.
    >>> Today the problem is the word "precision".
    >>>
    >>> If column names are written as quoted values everything works just
    >>> fine - the query
    >>> sent to the database should contain the quotes.
    >>>
    >>> Looking in my plists I see that some column names are quoted and
    >>> others are not (in
    >>> the same plist/entity), and this seems to have nothing to do with
    >>> what is sent to the db.
    >>> If I explicitly add the quotes in Entity Modeler it gets written
    >>> as "\"precision\"".
    >>>
    >>> Is there some way for me to force all table/view/column names
    >>> communicated to my
    >>> database to be quoted - perhaps a property I can set some where?
    >>>
    >>> (eclipse 3.3.2, stable WOLips, WO 5.3.3)
    >>>
    >>> /Anders
    >>
    >> Which database? The database plugin for EOF should control this.
    >>
    >> 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 : Fri Nov 28 2008 - 13:27:09 EST