Fast Object Database for Java - with JPA/JDO support

Changing Primary Key


I have a "Table" that currently has 

    private String userId;
    private long range;

private String someOtherField;

I need to add a @Id to someOtherField.  But when I add that, and query the table all the PK fields are null or 0.  What can I do to modify primary keys?




ObjectDB doesn't support changing primary keys, as it may break references to objects, indexes, etc.

You can always migrate data to a new class.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply