0

SQL Server 2008、OpenJPA2.2を使用しています

永続性の設定は正常に機能しfindAll()ます。

私はもう試した:

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id = 0;

そして持続する

public void persist()
{
    EntityManager em = entityManager();
    try
    {
        em.persist(this);
    }
    catch (Exception ex)
    {
        System.out.println(ex);
    }
    finally
    {
        em.close(); 
    }
}

結果は例外ではありませんが、データは挿入されません。

4

1 に答える 1