ObjectDB ObjectDB

Issue #1096: auto-generated uuid fields

Type: Feature RequestVersion: 2.4.7Priority: NormalStatus: ActiveReplies: 5
#1

Hello, we're porting a JDO application to ObjectDB which uses uuid-hex generated values. However the page on generated values in your JPA tutorial only mentions numeric generated values, and when we try to use it the error message seems to imply that auto-generating strings isn't supported.

Could you confirm whether this is the case? If so it seems an odd omission, given that it's part of both the JPA and JDO standards (JPA Generator.UUID_HEX and JDO value-strategy="uuid-hex") and that the Java language itself supports it (java.util.UUID).

ObjectDB Support
edit
delete
#2

Are you sure that this is part of JPA and not an extension of specific products?

Consider following a similar technique as a workaround.

If you provide references that show that JPA should support it as a generated value, then implementing this feature will get high priority.

ObjectDB Support
edit
delete
#3

My mistake - I was looking at Apache OpenJPA and Generator.UUID_HEX isn't listed as an extension, but it turns out EclipseLink doesn't have it so I guess it is only an extension of OpenJPA.

However we are using JDO and it has been in the JDO standard since 2.1.

Generating a UUID at construction time is an obvious workaround, but we will have to check that nothing depends on the ID being null until the object graph is persisted.

edit
delete
#4

Demand for JDO features by current ObjectDB users is low, since almost all the new projects that use ObjectDB are based on JPA.

If and when UUID is added to JPA, it may be implemented in ObjectDB for both JPA and JDO.

ObjectDB Support
edit
delete
#5

I understand that you have to follow the market.

But as my team uses JDO it would be helpful if you would at least document explicity which features of the JDO standard you don't support. At the minimum, your documentation page at http://www.objectdb.com/api/java/jdo/annotations/IdGeneratorStrategy which lists the UUIDHEX and UUIDSTRING strategies could include a brief comment to say that you don't support them.

edit
delete
#6

A comment was added to that documentation page.

The issue tracking system enables listing all the unsupported JDO features (this issue was added automatically to the list when it was created).

Thank you for your comments. If you find additional issues in supporting JDO please file issues using the "JDO Feature" category.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.