[jboss-user] [EJB 3.0] - EJB 3.0 and two databases

AkbarovS do-not-reply at jboss.com
Sun Apr 20 14:52:19 EDT 2008


Dear All,

I've two Enities: A (database #1, table A) and B (database #2, table B). 

@Entity
  | @Table(name = "A")
  | public class A{
  |   .....
  |   
  |   @ManyToOne
  |   @JoinColumn(name = "b_id")
  |   private B b;
  |   .....
  | }

and 2 units in persistence.xml: aCtx and bCtx

When I execute "select o from A o" I receive following error: Table B cannot be found. How can I set up persistence unit per entity?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145348#4145348

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145348



More information about the jboss-user mailing list