EJB 3 CascadeType annotation not required? if specified on DB.
Hi All,
If I using on delete/update cascade on my DB , then is it required for me to use annotation at the entity level ? And if not used what will be the result?
Whenever a entity manager remove/update is called entity , finally the request goes to DB and DB performs the cascade operations if any. But if that's the case then I am not able to understand why CacadeType annotation are introduced?
Discussions
EJB programming & troubleshooting: EJB 3 CascadeType annotation not required? if specified on DB.
-
EJB 3 CascadeType annotation not required? if specified on DB. (2 messages)
- Posted by: c shan
- Posted on: June 11 2010 03:00 EDT
Threaded Messages (2)
- EJB 3 CascadeType annotation not required? if specified on DB. by c shan on June 28 2010 07:43 EDT
- EJB 3 CascadeType annotation not required? if specified on DB. by Vaibhav Nirkhe on August 10 2010 02:33 EDT
-
EJB 3 CascadeType annotation not required? if specified on DB.[ Go to top ]
- Posted by: c shan
- Posted on: June 28 2010 07:43 EDT
- in response to c shan
nobody knows? or my question is wrong ? or am i missing something ?
EJB 3 CascadeType annotation not required? if specified on DB.
Hi All,
If I using on delete/update cascade on my DB , then is it required for me to use annotation at the entity level ? And if not used what will be the result?
Whenever a entity manager remove/update is called entity , finally the request goes to DB and DB performs the cascade operations if any. But if that's the case then I am not able to understand why CacadeType annotation are introduced? -
EJB 3 CascadeType annotation not required? if specified on DB.[ Go to top ]
- Posted by: Vaibhav Nirkhe
- Posted on: August 10 2010 02:33 EDT
- in response to c shan
There may be some legacy DB systems which do not support cascade at data base level still can be used with EJB 3 in this case the cascade annotation is useful .Also if the cascade is not enabled at the database level this is useful for doing it from the entity manager/application code .