Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Sequence support in DB2

Hi All,

Does EclipseLink support DB2 SEQUENCE objects? I have an application that should run on Oracle and DB2 databases. I’m using @SequenceGenerator in my entities for generating unique IDs. This works fine under Oracle but in DB2 I get NPE while accessing the ID after the entity was persisted. It looks like my entity reference was set to null after calling persist.


My scenario:


PackageJPAEntity packageEntity = new PackageJPAEntity();


packageEntity = em.merge(packageEntity);




return packageEntity.getPackageId();




The NPE is thrown from the line with the return statement.


I would appreciate any help.


Peter Szaniszlo 
Software Developer

škinova 3
040 01
Košice, Slovakia


Back to the top