java - unable to retrieve the new primary key from the database -


I have a gaming project, each game dynamically generates a unique ID. I use the ID using that segment Recovering the primary key from the databases I am after the game is over, the user can play the game again. The second time that game plays a new unique ID is generated. Now when I try to recover the new primary key by specifying the new primary key, instead of getting a new primary key, I'm getting the old primary key. What could be the reason for this strange behavior?

  Receive public long time Priority (string id) {query q = getSession (). CreateQuery ("From GameActivities F g, g.gameid = '" + id + "'"); Game_Answers ga = (Game_Answers) q.uniqueResult (); Return ga.getId (); }  


Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -