aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Entity beans and foreign keys Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Entity beans and foreign keys" Watch "Entity beans and foreign keys" New topic
Author

Entity beans and foreign keys

Irsan Saparianto
Greenhorn

Joined: Oct 03, 2001
Posts: 2
Hi,
I'm having problems with Entity Beans. The problem is, i cannot insert any row (using ejbCreate) to a table that has a foreign key coloumn. I've tried using CMP and BMP, nothing worked. This is weird, all find, update, and remove methods work, except the create method. I've also checked the deployment descriptors, they're okay. Has someone had this kind of problem? Can somebody help me?
By the way, i'm using Forte 3.0 EE, iPlanet Application Server 6.0 SP3, and MS-SQL Server 2000.
Sudharsan Govindarajan
Ranch Hand

Joined: Jul 03, 2002
Posts: 319
Irsan,

Have u solved this problem? I am facing the same problem with Mysql 4.0.17 & JBoss 3.2.3

Thanks,
Sudharsan


Joy is a radiation
chuck keuper
Greenhorn

Joined: Mar 17, 2004
Posts: 22
I am having this exact same problem with JBuilder 9 and BES 5.2. Was a solution found??
goose li
Greenhorn

Joined: Apr 04, 2005
Posts: 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' ' at line 1

mysql-4.1.7
JBuilder X

I have the same problem, I try to inert a photo into my MySQL server!
Ken Loh
Ranch Hand

Joined: Feb 16, 2005
Posts: 190
Sounds like an FK constraint. Best way to try is to construct a similar SQL query similar to the EJB-QL that you use and see what the result is if you enter it to your DB console. Only after the SQL works that you port it to EJB-QL.

My $0.02.
 
wood burning stoves
 
subject: Entity beans and foreign keys