Discussion:
[Middlegen-user] SQL Server schema problem
Markus Rådö
2002-10-15 13:34:04 UTC
Permalink
Hello,

is anyone using current Middlegen with SQL Server? The problem I have is
that to get Middlegen to read the tables in the database I have to
specify the database.schema with value="dbo", but then when I deploy the
app server (JBoss 3.0.3) tries to generate the tables even though they
already exist, because it looks for tables named dbo.Tablename which the
database doesn't find. What I need is jbosscmp-jdbc.xml with tablenames
without the schema prefix (@ejb.persistence table-name). Any ideas on
how to solve this? Maybe we need another cmp20 task attribute, like
schemaprefix="false"?

Markus
Aslak Hellesøy
2002-10-15 14:07:05 UTC
Permalink
Hi!

I think Eivind is using MSSQL, so maybe he can fill me in on this...

I don't remember exactly who wanted it to be the other way around:

http://cvs.middlegen.sourceforge.net/cgi-bin/viewcvs.cgi/middlegen/middlegen
/plugins/entitybean/src/middlegen/plugins/entitybean/entity-cmp-20.vm.diff?r
1=1.38&r2=1.39

But if some appservers/databases/drivers want it this way and other
combinations the other way, we must let the user choose. (I would be
surprised if one way would work in all combinations).

A new schemaprefix attribute would do it. Until it's implemented, just
modify the template locally yourself.

I've added a FR here:
http://sourceforge.net/tracker/index.php?func=detail&aid=623615&group_id=360
44&atid=415993

Cheers,
Aslak
-----Original Message-----
Rådö
Sent: 15. oktober 2002 17:34
Subject: [Middlegen-user] SQL Server schema problem
Hello,
is anyone using current Middlegen with SQL Server? The problem I have is
that to get Middlegen to read the tables in the database I have to
specify the database.schema with value="dbo", but then when I deploy the
app server (JBoss 3.0.3) tries to generate the tables even though they
already exist, because it looks for tables named dbo.Tablename which the
database doesn't find. What I need is jbosscmp-jdbc.xml with tablenames
how to solve this? Maybe we need another cmp20 task attribute, like
schemaprefix="false"?
Markus
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Eivind Waaler
2002-10-16 05:41:02 UTC
Permalink
I'm working with MSSQL and weblogic. For the sample app I've specified
schema=3D"dbo", which is used in the weblogic-cmp-rdbms-jar.xml:

<weblogic-rdbms-bean>
=09<ejb-name>Reservation</ejb-name>
=09<data-source-name>airline.database</data-source-name>
=09<table-name>dbo.reservations</table-name>

This works fine for me on weblogic. For running middlegen I'm using the
driver from inetsoftware (i-net Sprinta2000), on weblogic I'm running with
the built in driver.

=2Eeivind
Post by Aslak Hellesøy
Hi!
=20
I think Eivind is using MSSQL, so maybe he can fill me in on this...
=20
=20
http://cvs.middlegen.sourceforge.net/cgi-bin/viewcvs.cgi/middlegen/middle=
gen
Post by Aslak Hellesøy
/plugins/entitybean/src/middlegen/plugins/entitybean/entity-cmp-20.vm.dif=
f?r
Post by Aslak Hellesøy
1=3D1.38&r2=3D1.39
=20
But if some appservers/databases/drivers want it this way and other
combinations the other way, we must let the user choose. (I would be
surprised if one way would work in all combinations).
=20
A new schemaprefix attribute would do it. Until it's implemented, just
modify the template locally yourself.
=20
http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D623615&group=
_id=3D360
Post by Aslak Hellesøy
44&atid=3D415993
=20
Cheers,
Aslak
=20
-----Original Message-----
R=E5d=F6
Sent: 15. oktober 2002 17:34
Subject: [Middlegen-user] SQL Server schema problem
Hello,
is anyone using current Middlegen with SQL Server? The problem I have i=
s
Post by Aslak Hellesøy
that to get Middlegen to read the tables in the database I have to
specify the database.schema with value=3D"dbo", but then when I deploy =
the
Post by Aslak Hellesøy
app server (JBoss 3.0.3) tries to generate the tables even though they
already exist, because it looks for tables named dbo.Tablename which th=
e
Post by Aslak Hellesøy
database doesn't find. What I need is jbosscmp-jdbc.xml with tablenames
how to solve this? Maybe we need another cmp20 task attribute, like
schemaprefix=3D"false"?
Markus
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
=20
=20
=20
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
=20
Loading...