java - JPA equivalent of Hibernate's join and subselect in mapping -


Using Hibernate, I can use the join to map the field to an entity .

- Example -

If I have the following category:

  Public class command {Private string order number; Private string product name; Private string productive; Private string recipients; Private string recipient officer 1; }  

I can map that square with the following hibernate mapping:

  & lt; Class name = "order" table = "order" & gt; & Lt; Property Name = "Order No" Type = "java.lang.long" column = "order_num" /> & Lt; Join Table = "Product" & gt; & Lt; Subsylic & gt; SELECT o.order_id, p.name, p.cost from product p INNER join order o o Product_id = p. Product_id & lt; / Subselect & gt; & Lt; Major column = "order_dream" /> & Lt; Property Name = "Product Name" type = "java.lang.String" column = "name" /> & Lt; Property Name = "Productcast" type = "java.lang.Double" column = "cost" /> & Lt; / Joining & gt; & Lt; Included Table = "Recipient" & gt; & Lt; Subsylic & gt; SELECT o.order_id, r.name, r.address1, recipient R inner order o o oresian_id = R.Resize_ID & lt; / Subselect & gt; & Lt; Major column = "order_dream" /> & Lt; Property Name = "Recipient Name" type = "java.lang.String" column = "name" /> & Lt; Property Name = "Recipient Gadar 1" type = "java.lang.String" column = "address1" /> & Lt; / Joining & gt; & Lt; / Square & gt;  

Are there JPA annotations that give similar functionality?


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -