Modeling a Relationship Between Entity Beans
    
    
      Relationships can be modeled between any two entity beans on a class 
      diagram. The entity bean at each end of a relationship must be EJB 2.0, 
      with container-managed persistence and have a local interface.
    
    
      To model a relationship between two Enterprise JavaBeans on a diagram:
    
    
      - 
        Click the icon for the relationship you want to create, from those 
        listed on the EJB Component Palette:
 
 
          - 
            Relationship 1 to *   
- 
            Directed Relationship 1 to 1 
          
- 
            Directed Relationship 1 to *   
- 
            Directed Strong Aggregation  
 
 Notes: The navigability and multiplicity of a relationship end can be 
            changed after it has been created.
 
      
        If these icons are not displayed, select EJB
 from the dropdown on the Component Palette.
      
    
    
      - 
        Click the entity bean at the 'owning', or 'from', end of the 
        relationship.
        
          Note: If you want to represent this relationship 
          using a container-managed relationship (CMR) field, this is the bean 
          in which the field will be created.
         
- 
        Click the entity bean at the 'to' end of the relationship.
      
- 
        Click the relationship line on the diagram, then click the text fields 
        adjacent to the association to enter the relationship name.
        
          Note: To change the multiplicity of a relationship 
          end on the diagram, right-click on the relationship end and choose 
          either Multiplicity > 1 or 
Multiplicity > *.
         
    
    
      Related topics
    
    
      - 
        Modeling a Bean on a Diagram
      
- 
        Modeling a Reference Between 
        Modeled Beans
      
       
    
    
      
      Copyright © 1997, 2004, Oracle. All rights reserved.