Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLink 1.2.0 + PostgreSQL + Table name letter case issue

Hi Tom
Thanks for your quick reply.

The Entity model is as follows (I have several more with mixed case table
names, but this is the simplest I've got):
@Entity
@Table(name = "\"autoCompleteDirecciones\"")
public class persistentAutoComplete implements Serializable {
    private static final long serialVersionUID = 1L;
    @Transient
    private PropertyChangeSupport changeSupport = new
PropertyChangeSupport(this);
    @Id
    private String nombre = null;
    private String direccion = null;
    private String cpostal = null;
    private String poblacion = null;
    private String telefono = null;
    private Timestamp creado;
    @Version
    private Timestamp modificado;
    @Column( name = "modificadopor")
    private String usuario;
/* GETTER + SETTER METHODS */
}


When doing a simple query with EclipseLink 1.1.3 this is what the logger
shows:

[EL Fine]: 2009-11-25
15:34:21.874--ServerSession(10481832)--Connection(13232240)--Thread(Thread[AWT-EventQueue-0,6,main])--SELECT
NOMBRE AS NOMBRE1, DIRECCION AS DIRECCION2, POBLACION AS POBLACION3,
modificadopor AS modificadopor4, CREADO AS CREADO5, MODIFICADO AS
MODIFICADO6, TELEFONO AS TELEFONO7, CPOSTAL AS CPOSTAL8 FROM
"autoCompleteDirecciones" WHERE (UPPER(NOMBRE) LIKE ?) ORDER BY NOMBRE ASC
LIMIT ? OFFSET ?
        bind => [A%, 10, 0]

As you can see, table name is surrounded with quotation marks.

When doing the same query with EclipseLink 1.2.0 the logger shows the
following:

[EL Fine]: 2009-11-25
15:42:08.339--ServerSession(15595312)--Connection(14000809)--Thread(Thread[AWT-EventQueue-0,6,main])--SELECT
NOMBRE AS NOMBRE1, DIRECCION AS DIRECCION2, POBLACION AS POBLACION3, CREADO
AS CREADO4, modificadopor AS modificadopor5, TELEFONO AS TELEFONO6,
MODIFICADO AS MODIFICADO7, CPOSTAL AS CPOSTAL8 FROM autoCompleteDirecciones
WHERE (UPPER(NOMBRE) LIKE ?) ORDER BY NOMBRE ASC LIMIT ? OFFSET ?
        bind => [A%, 10, 0]

Quotation marks are no longer here...

As I stated in the first message I'm working with PostgreSQL and code fails
both in versions 8.1 and 8.4.


This is a major issue because the tables are accessed by my program and by
earlier legacy programs in the company, so I can't change the table name.

Hope it helps. Thanks again for your replies.
--
Marc Nuri

-- 
View this message in context: http://old.nabble.com/EclipseLink-1.2.0-%2B-PostgreSQL-%2B-Table-name-letter-case-issue-tp26511409p26513823.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top