Bugs item #677196, was opened at 2003-01-30 13:57
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=677196&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Richard Barrington (rich_b_nz)
Assigned to: Nobody/Anonymous (nobody)
Summary: SAP DB  fk-constraint-template incorrect

Initial Comment:
OS: SuSE Linux 8.0, running kernel 2.4.20
JDK: Sun Java 1.4.1_01
DB: SAP DB 7.3.0.29
JBoss: 3.0.5

When creating an <ejb-relationship-role> with 
<fk-constraint>true</fk-constraint>, the following
error is generated:

org.jboss.deployment.DeploymentException: Error while
adding foreign key constraint; - nested throwable:
(com.sap.dbtech.jdbc.exceptions.DatabaseException:
[-3014] (at 58): Invalid end of SQL statement)

This is due to the following incorrect syntax for the
SapDB type-mapping in standardjbosscmp-jdbc.xml:

 <fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT
?2 FOREIGN KEY (?3) REFERENCES ?4
(?5)</fk-constraint-template>

This should read:

 <fk-constraint-template>ALTER TABLE ?1 ADD FOREIGN KEY
?2 (?3) REFERENCES ?4 (?5)</fk-constraint-template>

This will then result in the correct response:
Added foreign key constraint to table 'TABLENAME'



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

>Comment By: Richard Barrington (rich_b_nz)
Date: 2003-01-30 15:04

Message:
Logged In: YES 
user_id=526886

diff for JBoss 3.0.6

1741c1741
<          <fk-constraint-template>ALTER TABLE ?1 ADD
CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4
(?5)</fk-constraint-template>
---
>          <fk-constraint-template>ALTER TABLE ?1 ADD
FOREIGN KEY ?2 (?3) REFERENCES ?4 (?5)</fk-constraint-template>


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

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


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to