Bugs item #445705, was opened at 2001-07-29 08:12
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=445705&group_id=22866

Category: JBossCMP
Group: v2.2.2 (stable)
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: David Jencks (d_jencks)
Summary: Cannot use pk-constraint with mySQL

Initial Comment:
There seems to be a problem using the <pk-constraint> 
tag when JBoss is bound to a mySQL data source.. Jboss 
refuses to create the underlying tables if the <pk-
constraint> tag is included in either the <entity> or 
<default-entity> tags in jaws.xml.

I have tried using this tag in both a specific entity 
and the default entity, setting it to 'true' 
or 'false' but JAWS simply refuses to create the 
tables. Removing the <pk-constraint> tag allows JAWS 
to create the tables on EJB deployment but this leads 
to tables with no primary key constraints!

Following is a sample from jawx.xml in case the 
problem is a mistake from my part:
<default-entity>
        <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>
        <debug>true</debug>
        <select-for-update>true</select-for-update>
        <pk-constraint>true</pk-constraint>
</default-entity>

Regards,
Colin Vella
[EMAIL PROTECTED]

----------------------------------------------------------------------

Comment By: Christian Riege (lqd)
Date: 2001-10-17 10:15

Message:
Logged In: YES 
user_id=176671

david, can you take care of this and mark it as CLOSED?

----------------------------------------------------------------------

Comment By: David Jencks (d_jencks)
Date: 2001-07-29 09:56

Message:
Logged In: YES 
user_id=60525

This was fixed in june in 2.5 with patch 424409, allowing
you to specify not null column constraints using a tag like
this:

<nullable>false</nullable>

This allows creation of tables with primary keys for rdbms
with nonstandard sql syntax requiring explicit not null
constraints for primary key columns.

Known db's with this archaic syntax:

firebird/interbase
mysql

The patch was applied to 2.5 but originally written for 2.2,
so there should be no problem for a user to apply to a
previous jboss version.

I still need to write up something for the manual and I
guess modify the appropriate dtd.

I'll assign this to myself when my name gets on the
appropriate list.

Thanks
david jencks

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=445705&group_id=22866

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

Reply via email to