Mantis - Resin
Viewing Issue Advanced Details
1438 major always 11-03-06 04:57 05-30-07 11:24
spoty  
ferg  
normal  
closed 3.1.0  
fixed  
none    
none 3.1.2  
0001438: Does not allow schema qualification or override with schema attribute
At 3.0.21 and 3.1 snapshot, qualifying table name in @table causes error during compiling of bean. Using "schema" attribute on @table produces same results.
Message:

com.caucho.config.ConfigException: 'logbook.entries' is not a valid database table. Either the table needs to be created or the create-database-tables attribute must be set.

Use to work. Tried using "schema" attribute instead, but produced same error. Database is postgresql. JDBC driver is postgresql-8.1-405.jdbc3.jar by putting in <root>/lib/local

Notes
(0001574)
spoty   
11-05-06 07:17   
This is a stupid user problem. Postgresql requires quoting of identifiers to get mixed-case support.

My table name is nav.NfdcFacilities and this fixed the problem:

@table(name="nav.\"NfdcFacilities\"")

It also requires quoting of @column(name="..."), because of the same complaint during creating of the bean implementation.

However, this creates other problems, because when the bean is compiled, the quotes are imbedded in the strings for performing database operations within the bean implementation. See following example of the compiler error generated:

/Users/catkins/resin/resin-pro-3.1.s061026/webapps/nav/WEB-INF/work/pre-enhance/temp/NfdcFacilitiesBean__ResinExt.java:181:
';' expected
      String sql = "select o."Type" from nav."NfdcFacilities" o where o."SiteNumber"=?";
                              ^
/Users/catkins/resin/resin-pro-3.1.s061026/webapps/nav/WEB-INF/work/pre-enhance/temp/NfdcFacilitiesBean__ResinExt.java:268:
';' expected
    String sql = "insert into nav."NfdcFacilities" ("SiteNumber", "Type") values (?, ?)";
                                   ^
/Users/catkins/resin/resin-pro-3.1.s061026/webapps/nav/WEB-INF/work/pre-enhance/temp/NfdcFacilitiesBean__ResinExt.java:320:
';' expected
    String sql = "delete from nav."NfdcFacilities" where "SiteNumber"=?";
                                   ^
3 errors

(0001971)
ferg   
05-30-07 11:24   
jpa/0g11, jpa/0g2f