Archived

This forum has been archived. Please start a new discussion on GitHub.

How can I defined the class in ice?

HI,
if i have two classes (A and B) which are many to many .how can I defined them?
Class A{
private long id;
private Set<B> agentGroups = new HashSet<B>(0)
}
Class B{
private long id;
private Set<A> agents = new HashSet<A>(0);
}

Comments

  • I use java and ice3.4.1
  • bernard
    bernard Jupiter, FL
    The equivalent Slice definitions would be something like:
    module Demo
    {
    
    class A;
    class B;
    
    sequence<A> ASeq;
    sequence<B> BSeq;
    
    class A
    {
       long id;
       BSeq agentGroups;
    };
    
    class B
    {
      long id;
      ASeq agents;
    };
    
    };
    

    Best regards,
    Bernard
  • thank you!