From: Vladimir G. <vla...@du...> - 2009-12-23 18:55:25
|
Ok, you could be right about the current state of things. (For my education: where is that setting that instructs Hibernate on "NATIVE" vs "SEQUENCE"?) Then, how do we know which tables (besides the 2 you mentioned) we should take into account for computing the MAX value, to be set as the new seed for hibernate_sequence? Another concern: resetting hibernate_sequence now is likely to affect the subsequent TB1->TB2 import that we plan to do for the release. Someone must have given thought to all these issues already. All the reasons to relax and enjoy the holidays! --VG On Dec 23, 2009, at 1:19 PM, youjun guo wrote: > Vladimir, > > Based on the error massage I send to you, I am quite sure, right > now, treebase code simply ignored those xxxx_id_sequence you > mentioned in the treebase_dev. Those sequences only work for insert > via database like commandline but not working for treebase code. > > The hibernate only look at it own configuration unless you tell it > to do something else in its configration. > > Youjun > > On Wed, Dec 23, 2009 at 12:25 PM, Vladimir Gapeyev <vla...@du... > > wrote: > 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 > > > ------------------------------------------------------------------------------ > 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 |