@Entity
@Inheritance(strategy=InheritanceType.JOINED)
public class OrderFormLineTraffic implements java.io.Serializable {
            @ManyToOne(cascade={CascadeType.PERSIST},fetch=FetchType.LAZY)
        @JoinColumn(name="orderFormLineID")   //,table="OrderFormLineTraffic" 
table can not use on JOINED relationship
    private OrderFormLine orderFormLine;
}


@Entity
@Inheritance(strategy=InheritanceType.JOINED)
@PrimaryKeyJoinColumn(name="orderFormLineAirplaneId")
public class OrderFormLineAirplane extends OrderFormLineTraffic implements 
java.io.Serializable {

}


@Entity
public class OrderFormLine implements java.io.Serializable {
        
@OneToMany(targetEntity=OrderFormLineAirplane.class,cascade={CascadeType.ALL}, 
fetch=FetchType.LAZY, mappedBy="orderFormLine")
        private Collection orderFormLineAirplane;
}

 error: column orderFormLineID invalid on OrderFormLineAirplane table.  
it inherit from supper class OrderFormLineTraffic. But can not define 
table="OrderFormLineTraffic" on @ManyToOne relationship orderFormLine 

select orderforml0_.orderFormLineID as orderFor9_1_, 
orderforml0_.orderFormLineAirplaneId as orderFor1_1_, 
orderforml0_.orderFormLineAirplaneId as id179_0_, 
orderforml0_1_.orderFormLineID as orderFor7_179_0_, orderforml0_1_.startPoint 
as startPoint179_0_, orderforml0_1_.destinationPoint as destinat3_179_0_, 
orderforml0_1_.startDateTime as startDat4_179_0_, orderforml0_1_.arriveDateTime 
as arriveDa5_179_0_, orderforml0_1_.createTime as createTime179_0_, 
orderforml0_.ticketNo as ticketNo180_0_, orderforml0_.airwaysName as 
airwaysN3_180_0_, orderforml0_.scheduledFlightNo as schedule4_180_0_, 
orderforml0_.startAirdrome as startAir5_180_0_, orderforml0_.desinationAirdrome 
as desinati6_180_0_, orderforml0_.eairplaneModel as eairplan7_180_0_, 
orderforml0_.ebunkModel as ebunkModel180_0_ from OrderFormLineAirplane 
orderforml0_ inner join OrderFormLineTraffic orderforml0_1_ on 
orderforml0_.orderFormLineAirplaneId=orderforml0_1_.id where 
orderforml0_.orderFormLineID=?


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

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

Reply via email to