Varun,
I'm confused... shouldn't it be catalogName.schemaName.tableName?
thanks,
-marina
Varun Rupela wrote:
> Hi:
>
> Using the schema and catalog attribute of @Table (or <table> in orm.xml)
> and using ddl-generation causes the generated ddl to have dotted table
> name references of the following type: schemaName.catalogName.tableName.
>
> Now, Derby doesn't like a statement "create table
> schemaName.catalogName.tableName" and throws an exception that the
> Provider logs with the following Warning:
> [TopLink Warning]: 2006.09.25
> 02:21:46.567--ServerSession(22591049)--Exception [TOPLINK-4002] (Oracle
> TopLink Essentials - 2006.8 (Build 060908)):
> oracle.toplink.essentials.exceptions.DatabaseException
> Internal Exception: org.apache.derby.client.am.SqlException: Syntax
> error: Encountered "." at line 1, column 36.Error Code: -1
> Call:CREATE TABLE
> schema_XML.catalog_XML.OverridingTableAnnotation_FROM_XML (ID BIGINT NOT
> NULL, DEPTNAME VARCHAR(255) NOT NULL, DEPTCOLORCODE VARCHAR(255) NOT
> NULL, PRIMARY KEY (ID))
> Query:DataModifyQuery()
>
> - After doing some search and speaking to some folks working on Derby,
> it seems that catalogName doesn't have a meaning when used as above. Is
> the ddl-generator expected to ignore the entry for catalog when
> generating ddl for Derby? Is this a bug?
> - Not using catalog but using schema generates a statement like "create
> table schemaName.tableName" which derby does execute correctly.
>
> Thanks.
>
> varun.