Title: RE: [Middlegen-user] mssql 2000 jdbc driver
I always thought it was bad form to fully qualify a table name with the schema in application code. It makes having multiple environments (dev/test) in a single database instance difficult. It also prevents re-direction via synonyms if you are trying to redirect a query to a different table transparent to the application. I was suprised to see the schema prefix on the tablename as the default. It's not a big deal but a patch would definately make sense, and the default should probably be to leave off the schema.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Rod Macpherson
Sent: Tuesday, December 03, 2002 7:22 PM
To: Aslak Hellesøy; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [Middlegen-user] mssql 2000 jdbc driver

The schema is normally implicit when logging in as an oracle user so it is surprising that a schema name is required in middlegen but it is definitely required.  The problem is that when you deploy under JBoss the schema qualifier causes a failure. I solved this by filtering jbosscmp-jdbc.xml to remove the schema prefix on table-name elements and that worked fine. So you need the schema to generate the code but you have to filter it out before you deploy to JBoss. That seems to be the situation with oracle/jboss at least. Sounds like a possible JBoss error? 
 
-----Original Message-----
From: Aslak Hellesøy [mailto:[EMAIL PROTECTED]]
Sent: Tue 12/3/2002 3:32 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc:
Subject: RE: [Middlegen-user] mssql 2000 jdbc driver



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: 3. desember 2002 23:46
> To: [EMAIL PROTECTED]
> Subject: [Middlegen-user] mssql 2000 jdbc driver
>
>
> Hi,
>
> I have a small problem with middlegen when I use the mssql 2000 jdbc
> driver.  It puts the schema name in front of the table name in the
> @ejb.persistence tag.  Instead of @ejb.persistence table-name="contacts",
> I get @ejb.persistence table-name="dbo.contacts".  This results in syntax
> errors which abort the deployment.
>

We added the schema name because some ejb container (or was it jdbc driver?)
required the schema name to _be_ present.

> I added an option to middlegen to take care of the problem but I was
> wondering if there was a way to fix it without a source change.  I didn't

Currently there is no such option. Your patch to make this optional is most
welcome.

> see one but I haven't used middlegen very long so I could have easily
> missed something.  If it turns out that the change is needed,  I'll submit
> it as a patch.
>
> Thanks,
> Scott
>

Cheers,
Aslak

>
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Microsoft Visual Studio.NET
> comprehensive development tool, built to increase your
> productivity. Try a free online hosted session at:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
> _______________________________________________
> middlegen-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/middlegen-user



-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET
comprehensive development tool, built to increase your
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to