Re: EM generating bad SQL for constraints and indexes (Postgresql)

From: Mike Schrag (mschra..dimension.com)
Date: Wed Mar 26 2008 - 13:55:04 EDT

  • Next message: Jean Pierre Malrieu: "Re: EM generating bad SQL for constraints and indexes (Postgresql)"

    You also could just make a temp project that uses 5.3, copy your model
    into it, and SQL gen in that.

    ms

    On Mar 26, 2008, at 1:15 PM, jp.malrie..ree.fr wrote:

    > Selon Mike Schrag <mschra..dimension.com>:
    >
    >> Are you using 5.4? 5.4 has a bug that causes SQL generation to not
    >> properly call through the plugin.
    >>
    >> ms
    >
    > Yes. I cannot really revert to 5.3, because the administrators who
    > build and
    > deploy my apps on tomcat have devoted too much time making it work
    > with 5.4 :(
    > I guess I am f**ked and I have to tweak the SQL by hand...
    >
    > Thanks for the fast reply.
    >
    > JPM
    >
    >
    >>
    >> On Mar 26, 2008, at 12:58 PM, jp.malrie..ree.fr wrote:
    >>
    >>> Hi,
    >>>
    >>> I am trying to use EntityModeler to setup a postgresql database. I
    >>> am prefixing
    >>> the table names by their schema (eg: "notes.staffmeeting"). When I
    >>> generate the
    >>> sql from EM, the generated sql contains prefixed names for
    >>> constraints and
    >>> indexes:
    >>>
    >>> ALTER TABLE notes.Period ADD CONSTRAINT notes.Period_pk PRIMARY KEY
    >>> (id);
    >>> CREATE INDEX notes.ReportCard_classAssessmentID_idx ON
    >>> notes.ReportCard(
    >>> classAssessmentID );
    >>>
    >>> In postgresql syntax, these are not valid names for constraints and
    >>> indexes
    >>> (they ought not be prefixed). So SQL execution fails.
    >>>
    >>> I don't know if EM is responsible for this, or the postgresql plugin
    >>> (from
    >>> Wonder). Should I file a bug about this issue?
    >>>
    >>> Thanks.
    >>>
    >>> JPM
    >>>
    >>>
    >>
    >>
    >>
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Mar 26 2008 - 13:56:47 EDT