我为以下代码获取空值。我正在使用oracle DB并且它工作正常。但是当我尝试使用MySQL数据库时,我得到空值,即使表中有足够的值。
@Entity
@Table(name = "TEST_ORDER")
@NamedQueries({
@NamedQuery(name = "sample.testorder.findBytestId", query = "SELECT
rodtl.testOrder FROM TestOrderDetail rodtl WHERE rodtl.id.testDesignId = ?
1"),
------------------------------------------
@OneToMany(mappedBy = "testOrder")
private Set<TestOrderDetail> testOrderDetails;
-----------------------------------------
Collection<TestOrder> testOrderList =
em.createNamedQuery("sample.testorder.findById").setParameter(1,
testDesignId).getResultList();
请建议......