If I have a entity defined like this that is stored in App engine's Big Table:
@Entity
@Table(name = "users")
public class User implements Serializable{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Long id;
private String username;
private String password;
private String encryptedPassword;
private String creationDate;
private String modificationDate;
private Boolean validated;
// Code omitted
}
And if I have another entity with another table annotation say, @Table(name = "profile")
would each entity Id's independent to each other. For example there is a User entity which have an id that is 0 and a Profile entity having a id 0.
I mean since entities are stored in a "big table" then sequential Id's will be assigned for all entities stored. Does adding such annotation solve this issue for entities to have independent sequence of id's?
What I'm trying to accomplish is that each entity to have its own Id starting from 0 to n, that each entity type to have its own sequence, e.g. User entities will be in a Long type sequentially starting from zero, and the same with the Profile entities to start with 0 too.