I think so. It should be a default also. There was also someone who wanted to map the user name to the schema name. This needs a little more thought, since there could be problems with uniqueness of pk's if you aren't careful. I'm also not sure how this would work with create-tables -- if you sudenly find a new user do you run out and create a whole new set of tables for them? Do you create the schema for them also?
david jencks On 2002.04.15 11:56:00 -0400 Dain Sundstrom wrote: > This looks like a hack to me. Should we consider adding a schema-name > element to the table configuration? By this I mean that where ever we > have table-name in the jbosscmp-jdbc.xml file we can have an optional > schema-name element. Also in the getTables call in we would pass the > schema name as the second argument. > > Does this make since? > > Does anyone else have an opinion on this? > > -dain > > [EMAIL PROTECTED] wrote: > > > Maybe you could take only the last period delimited token (meaning in > > > MYSCHEMA.MYTABLE use MYTABLE) as the tablename when you must be using > > > only a table name, not a qualified tablename. I would expect that > > > most RDBMS products, open or closed source, use this convention of "." > > > delimiting tokens in table and column names. > > > > Cheers > > > > > >>From: Dain Sundstrom <[EMAIL PROTECTED]> > >>Date: 2002/04/15 Mon AM 10:40:32 EDT > >>To: [EMAIL PROTECTED] > >>Subject: Re: [JBoss-dev] Problem in JDBCStartCommand.java > >> > >>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 > >> > >> > > > > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > > _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development