This brings up a question.  Will jBoss ever use syntax such as PRIMARY KEY 
on primary key fields when auto-creating tables? (esp. for simple ejb 
primary keys)   It sounds like something most people would want --- maybe 
the setting could be changed at deploy-time in jaws.xml?  This should help 
speed up access on large datasets.  Are there any RDBMS that don't support 
the primary key directive on table create?  I have gone back to creating 
the tables by hand, since I feel that I get a more solid db structure.

-jason








Charles Crain <[EMAIL PROTECTED]>
10/11/00 02:26 PM
Please respond to jBoss

 
        To:     jBoss <[EMAIL PROTECTED]>
        cc: 
        Subject:        Re: [jBoss-User] Someone experienced with jBoss/mySQL ?

There used to be a problem in the mySQL type mappings that mapped
java.lang.String to a VARCHAR(256), when mySQL only supports a max of 255
characters in a VARCHAR.  I had to change this manually in the jaws.xml to
get it to work, otherwise the table would not get created.

Another mySQL problem you might see will happen if you try to use their
transactional tables.  Right now, they require a primary key with these
tables, but (at least last time I tried), jBoss does not create the table
using the PRIMARY KEY directive, so the create would fail.  The only way I
know of to get out of this is to create the table yourself.

-Charles

----- Original Message -----
From: "Daniel Schulze" <[EMAIL PROTECTED]>
To: "jBoss" <[EMAIL PROTECTED]>
Sent: Wednesday, October 11, 2000 11:17 AM
Subject: Re: [jBoss-User] Someone experienced with jBoss/mySQL ?


> I m on it.
>
> Give me 2 hours...
>
> \Daniel
>
>
> On Wed, 11 Oct 2000, Bjarne Olsen wrote:
> > Hi !
> > This morning I have successfully deployed my first Entity-Bean with
jBoss
> > using a Hypersonic SQL DB. When I tried to move to mySQL - having read
the
> > jaws docu - jBoss did not want to talk with mySQL for 3 hours.
> >
> > I think I have found problem now: Although the line
> >
> > <create-table>true</create-table>
> >
> > is in my jaws.xml file jBoss did not create the table. When i created 
it
> > manually everything worked from then on.
> >
> > Does anybody have the same problem ? Maybe a jBoss-Bug ?
> >
> > Bye
> > Bjarne
> >
> >
> > ====
> > Bye the way: I still get a NullPointerException when deploying my
> > jar-file, but this does not matter, jBoss deploys it anyway
> > here is my jaws.xml file:
> >
> > <?xml version="1.0" encoding="Cp1252"?>
> >
> > <jaws>
> >      <datasource>MySQL</datasource>
> >      <type-mapping>mySQL</type-mapping>
> >      <type-mappings>
> >        <type-mapping>
> > <name>mySQL</name>
> > <mapping>
> >    <java-type>java.sql.TimeStamp</java-type>
> >    <jdbc-type>TIMESTAMP</jdbc-type>
> >    <sql-type>TIMESTAMP</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.lang.Long</java-type>
> >    <jdbc-type>BIGINT</jdbc-type>
> >    <sql-type>BIGINT</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.lang.Character</java-type>
> >    <jdbc-type>CHAR</jdbc-type>
> >    <sql-type>CHAR</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.lang.Short</java-type>
> >    <jdbc-type>INTEGER</jdbc-type>
> >    <sql-type>INTEGER</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.lang.Double</java-type>
> >    <jdbc-type>DOUBLE</jdbc-type>
> >    <sql-type>DOUBLE</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.lang.Boolean</java-type>
> >    <jdbc-type></jdbc-type>
> >    <sql-type>BIT</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.lang.Byte</java-type>
> >    <jdbc-type>TINYINT</jdbc-type>
> >    <sql-type>TINYINT</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.lang.Object</java-type>
> >    <jdbc-type>BLOB</jdbc-type>
> >    <sql-type>BLOB</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.lang.Float</java-type>
> >    <jdbc-type>FLOAT</jdbc-type>
> >    <sql-type>FLOAT</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.util.Date</java-type>
> >    <jdbc-type>DATE</jdbc-type>
> >    <sql-type>DATE</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.lang.String</java-type>
> >    <jdbc-type>VARCHAR</jdbc-type>
> >    <sql-type>VARCHAR(256)</sql-type>
> > </mapping>
> > <mapping>
> >    <java-type>java.lang.Integer</java-type>
> >    <jdbc-type>INTEGER</jdbc-type>
> >    <sql-type>INTEGER</sql-type>
> > </mapping>
> >        </type-mapping>
> >      </type-mappings>
> >      <enterprise-beans>
> >        <entity>
> > <ejb-name>EJBEntityTest</ejb-name>
> > <table-name>EJBEntityTest</table-name>
> > <create-table>true</create-table>
> > <remove-table>false</remove-table>
> > <tuned-updates>false</tuned-updates>
> > <read-only>false</read-only>
> > <time-out>300</time-out>
> > <cmp-field>
> >    <field-name>thekey</field-name>
> >    <column-name>thekey</column-name>
> >    <sql-type>VARCHAR(256)</sql-type>
> >    <jdbc-type>VARCHAR</jdbc-type>
> > </cmp-field>
> > <cmp-field>
> >    <field-name>value</field-name>
> >    <column-name>value</column-name>
> >    <sql-type>INT</sql-type>
> >    <jdbc-type>INT</jdbc-type>
> > </cmp-field>
> >        </entity>
> >      </enterprise-beans>
> >    </jaws>
> >
> >
> >
> >
> > --
> > Sent through GMX FreeMail - http://www.gmx.net
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Problems?:           [EMAIL PROTECTED]
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]






--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to