Here is my irritating issue.
I'm having two entity beans
One is Film and another one is Copy.
there is one to many relationship between them (there can be many copies of one film).
I have created a web form were i put the film data and the count of copies. Then in the bussiness code I'm creating the film i persist the film bean and then i create "count of copies" times Copy bean and fill each copy data. When I try to persist them (the copies) I get ORA-02291 (Parent foreign key not found) - this is because a batch update takes place. The Film is not in the database. When i persist the film, and afterwards persist the copies I don't get this problem but I want to have the copies created immediately when the film data is specified. How can I make JBoss store the film data before storing the copies? I've tried the EntityManager.flush() but it doesn't work...
I would appreciate any help.
this is not because of batch update.
Wo code, I cna't help you more