Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3184

How to have two entities for one table in Eclipse Link?

$
0
0

Hi All,

I am new to Eclipse Link. I wanted to have two entities for one table and I want to insert data into the table.

For example:

 

Entity 1:

 

@Entity

@Table(name = "myTable")

public class myEntity1 {

id;

commonField;

 

}

 

 

Entity 2:

 

@Entity

@Table(name = "myTable")

public class myEntity2 {

idEntity;

commonField;  

 

}

 

Please note "commonField" is common to both entities.

Please guide.


Viewing all articles
Browse latest Browse all 3184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>