users@glassfish.java.net

Auto-escaping table and column names

From: <glassfish_at_javadesktop.org>
Date: Mon, 09 Feb 2009 07:18:33 PST

I have a couple tables that have names that conflict with SQL Server keywords. To get around this problem, I have added the @Table annotation as follows::

@Table(name="[User]")
@PrimaryKeyJoinColumn(name="User_Code")
public class User extends BaseEntity {
  ...
}

Is there a way to get Toplink to generate the necessary database escape sequences for all tables and columns so that I don't have to put database-specific code into my entity beans?
[Message sent by forum member 'kdeanddd' (kdeanddd)]

http://forums.java.net/jive/thread.jspa?messageID=330841