JL@esial wrote:

> Hello,
> 
> I am using JBoss 3.0.0beta2(200204150942) on Win2k SP2.
> The function tableExists in this class makes the following jdbc call:
> rs = dmd.getTables(con.getCatalog(), null, tableName, null);
> 
> I am using DB2 as dbms, and this piece of code will not work if 

> tableName contains a prefix. 


Why would it have a prefix?

> Indeed, I have to configure my 

> jbosscmp-jdbc.xml ejb/table mappings like that:
> <table-name>MYSCHEMA.MYTABLE</table-name> 
> to get the SQL statements work properly with DB2. But then the 

> tableExists method will always return false since it takes 

> MYSCHEMA.MYTABLE as tableName.


JBossCMP tries it's best to autogenerate tables, but it can not solve 
all problems.  I shoot for 80%.  If you need an exact mapping, you will 
have to create the tables by hand (you should also do this before 
sending the application to production).

If you have a *SIMPLE* solution that works on all of the major 
commercial and all opensource DBs, then I am open to the suggestion/ patch.


> Is there an easy way to set a tablename prefix or even a schema

> name in jbosscmp-jdbc.xml ? Right now, I think I will have to 

> patch my own code, but I believe many people out there using 

> DB2 or Oracle might encounter the same problem.

I don't think others have this problem, as you are the first to report 
it as a problem.

-dain


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to