views:

35

answers:

1

hi,

  I created table in google Big table datastore ,In that the i set primary key using 

@annotations as follows

@Id

@Column(name = "groupname")

private String groupname;

@Basic

private String groupdesc;

I worked corretly,but it override the previous record,how to solve this

for eg

if i entered

groupname=group1

groupdesc=groupdesc

than it accept after that i enter same groupname it override previous record for eg groupname=group1 groupdesc=groups

this record override previous one.

+1  A: 

This is simply how the App Engine datastore works: It does not distinguish between insertions and updates. If you're not confident they keys you're generating yourself are unique, you either need to use auto generated keys, or check for existence before inserting a record.

Nick Johnson