IntelliJ Java IDE
The moose likes JBoss and the fly likes FKs must be allow null with jboss??? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » JBoss
Reply Bookmark "FKs must be allow null with jboss???" Watch "FKs must be allow null with jboss???" New topic
Author

FKs must be allow null with jboss???

Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
Hi,
i cannot insert a data in one table because it's FK doesn't allow null and i only set the FKs in ejbPostCreate(), as it should be.

So, do i have to make all my FKs allow null or there's other solution?

Thanks,
ltcmelo
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
What database are you using? Typically there is a way to configure the DB so that it doesn't check constraints until transaction commit. This would solve your problem.
Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
I`m using MySQL, do u know if it`s possbible?
 
 
subject: FKs must be allow null with jboss???
 
Threads others viewed
map
one-to-many relationship: what is the design consideration ?
Id not availble in lazy loaded associate objects
CMR fights relational databases
FK/PK
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture