I put here my example of 3 tables, i hope you asking of such example (in your 
case 2 tables)



  | @MappedSuperclass
  | public class IdTable implements Serializable {
  |     @Id @GeneratedValue(strategy=GenerationType.TABLE)
  |     public Long id;
  | 
  | }
  | 
  | @MappedSuperclass
  | public abstract class BasicPrimaryTable extends IdTable {
  |                     
  |     @Version public Integer version;
  | }
  | 
  | @Entity
  | public class SomeTable extends BasicPrimaryTable {
  | 
  | }    
  | 
  | 

if you dont want to extend some calss you need put like this:


  | @Embeddable
  | public class SomeClass {
  |     @Column(nullable = false, length=255) public String name;
  | }
  | 
  | @Entity
  | public class SomeTable  {
  | @Embedded private SomeClass some;
  | }
  | 


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965694
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to