> I created a class Employee.java > it has got > @PrimaryKey > @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) > private Key key; > > �...@persistent() > private String empID; > > �...@persistent > private String firstName; > > So when ever I creates new entry in datastore, and i checked in the > browser... it shows one additional column as below > Key ID/Name empID firstName > > So how is this ID/Name column is created... Its always increasing a by one > number.. Say 1 2 3 4 and so on..... > So is there any way I can customize that column. That means instead of > every time i create a empID programmaticly I would rather want that ID/Name > column to be updated in way i want. ie say like company_name_00001, > company_name_00002 and so on.....
You're using an IDENTITY value as the key. By definition, that's an automatically generated, incremented value. But you don't have to use IDENTITY: http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Creating_and_Using_Keys You have to specify a different constant instead of IdGeneratorStrategy.IDENTITY: http://db.apache.org/jdo/api21/apidocs/javax/jdo/annotations/IdGeneratorStrategy.html Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.