シーケンス....

Employeeのidに

@SequenceGenerator(name="employee_gen", sequenceName="empseq")
@GeneratedValue(generator="employee_gen")
@Id 

として、実行!!!

Exception in thread "main" javax.persistence.PersistenceException: Exception [TOPLINK-7144]
 (Oracle TopLink Essentials - 2006.6 (Build 060628)): 
oracle.toplink.essentials.exceptions.ValidationException
Exception Description: empseq: platform DatabasePlatform doesn't support NativeSequence.

...お後がよろしいようで。。。時期尚早?v2の最新versionでおいおい確認。


追記:@SequenceGenerator(name="employee_gen", sequenceName="empseq")、@GeneratedValue(generator="employee_gen")のアノテーションは挿入時に採番されるから検索系では大丈夫かなと思って、アノテーションはそのままにして、単純な検索をしたけど、NG。。。EntityManagerSetupImplで同様のExceptionが投げられる。これは仕様かな?JSR220 specで、アノテーションとEntityManagerをサクっと見た感じでは、仕様としては書いてないように見える。TopLink仕様かな、おいおい確認。


今日のH2コマンド

create sequence empseq start with 1 increment by 1