0 Replies Latest reply on Apr 30, 2008 10:15 AM by Tobi Felle

    Jointable not used

    Tobi Felle Newbie

      Hi all,
      I am working with Jboss 5 beta 4, JPA und the HSQL Database.
      This is my JoinTable definition in class Subscription:

      @ManyToMany(targetEntity=com.sap.sii.pubsub.entity.Subscriber.class, fetch = FetchType.EAGER)
       joinColumns = @JoinColumn(name = "SUBSCRIPTION_ID", referencedColumnName = "SUBSCRIPTION_ID"),
       inverseJoinColumns = @JoinColumn(name = "SUBSCRIBER_ID", referencedColumnName = "SUBSCRIBER_ID"))
      public ArrayList<Subscriber> getSubscribers() {
       return subscribers;

      The other side in class Subscriber:
      @ManyToMany(targetEntity=com.sap.sii.pubsub.entity.Subscription.class, fetch=FetchType.EAGER, mappedBy="subscribers")
      public ArrayList<Subscription> getSubscriptions() {
       return subscriptions;

      And there is the table SII_PUBSUB_SUBSCRIPTION_SUBSCRIBER with the columns SUBSCRIPTION_ID andSUBSCRIBER_ID. But when I persist the entity this table is empty but there is are the columnssubscriptions and subscribers with some data looking like object references:([B@7f8124) in the tables of subscription and subscriber.