The client program cannot directly call the CMRField problem between CMP One-Many relationship

xiaoxiao2021-03-06  78

A question found when doing CMP: such as a student watch, a student phone watch. A student can have multiple calls, which is one-MANY relationship. In the client program, after finding a student, it is thought that it can get its phone list directly through the CMR Field, but the program error, prompts "CMR managed by the CMP container cannot be called directly by the client". It seems that this is the principle of EJB specification. So if you need to read the CMR, you want to clone, return the Clone's Collection / SET. But I want to modify (write) this CMR is impossible.

转载请注明原文地址:https://www.9cbs.com/read-94950.html

New Post(0)