Hello Everybody, I have container managed relationship between two entity beans say A and B. The relationship between A and B is 1 --> *
B has only local inteface. It is only through Bean A, Bean B is created. Now I have field say x in the the Bean B which is not a primary key field. While creating Bean B thru Bean A, the values in the x should NOT be duplicated (with respect to A's Primary Key Field). hope u get this. Now I have two straight forward options. Option 1: I can iterate through the collection(CMR Field) in the Bean A and compare the value of x that will be used in the creation of new instance of B with the already present instance possible by using getX() on each instance in the Collection maintained in A. Option 2: use ejbSelect, join the two tables and find for an instance of B, which already has value of x which is equal to the new value of x. I feel this approach is very costly as it will require cartesian product. Option 1 is also not appreciated, since I have to iterate thru the collection of home interface and make a method call in each instance and compare. If it had been CMP 1.1, I knew the relationship field name in Bean B, so this task can be easily achieved with a simple Finder in B. Please let me know, the best possible approach for my problem. it will be great, if someone is able to HEEEEEEEEEEEEEEELP me. Thanks in advance. Shreedhar Natarajan. =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
