From: Vladimir G. <vla...@du...> - 2009-12-23 17:25:37
|
I think we need someone who is more aware about what is going on in TB2 (Rutger? Bill?) to resolve this. Since the postgres sequence taxonlabel_id_sequence is declared in the schema as the sequence for the taxonlabel table and since they are perfectly in sync with each other, I presume that doing anything to hibernate_sequence would be a mistake. --Vladimir On Dec 23, 2009, at 11:37 AM, youjun guo wrote: > Hilmar & Vladimir, > > When hibernate insert a record into the database, it need to create > a unique id (primer_key) for it. > > In treebase hibernate use sequence. yes It is a database object in > treebase-dev. hibernate will ask for a key from this sequence object. > > By default hibernate will looking for a sequence object named > "hibernate_sequence" unless some other sequence are explicitly > appointed in hibernate configuration (NOT DATABASE SETUP). > > In the treebase code, I didn't find any other sequence defined in > the hibernate configuration. I assume it will use default that is > "hibernate_sequence". > > Most importantly the testing code do complain primer key conflict in > these two tables, And the key hibernate got from the sequence do > exist in the tables already. > > Only the owner of the treebase-dev can make change of the sequence. > > Youjun > > > > On Wed, Dec 23, 2009 at 10:29 AM, Vladimir Gapeyev <vla...@du... > > wrote: > In the schema, both taxonlabel and phylotreenode use their own > sequences (taxonlabel_id_sequence and phylotreenode_id_sequence) whose > current values are in sync with the tables. What is the purpose of > the hibernate_sequence sequence? --VG > > > On Dec 23, 2009, at 7:42 AM, youjun guo wrote: > > > Hilmar and Bill, > > > > In our database, the current hibernate_sequence value (1416) is much > > smaller than max id value of table taxonlabel and phylotreenode, > > that make primer key conflict when hibernate try to insert new data > > into this two table. > > > > It need to be change to a bigger number so that the current value > > big than max phylotreenode_id. > > > > I tried but the server said only the owner can alter it. > > > > Enjoy your holiday to all! > > > > Youjun > > > ------------------------------------------------------------------------------ > > This SF.Net email is sponsored by the Verizon Developer Community > > Take advantage of Verizon's best-in-class app development support > > A streamlined, 14 day to market process makes app distribution fast > > and easy > > Join now and get one step closer to millions of Verizon customers > > http://p.sf.net/sfu/verizon-dev2dev > > _______________________________________________ > > Treebase-devel mailing list > > Tre...@li... > > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel |