[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Jointable not used
felle82
do-not-reply at jboss.com
Wed Apr 30 10:15:40 EDT 2008
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)
| @JoinTable(name = "SII_PUBSUB_SUBSCRIPTION_SUBSCRIBER",
| 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 at 7f8124) in the tables of subscription and subscriber.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147860#4147860
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147860
More information about the jboss-user
mailing list