From: youjun g. <you...@ya...> - 2009-12-25 16:11:59
|
Dear All, One thing need to be explained is that hibernate never bypass postgresql to generator any primer key ever. All the sequences include hibernate_sequence are existing object in treebse-dev. "hibernate_sequence" is just a name of the sequence it can be named anything else. The only difference is: method 1. use one single sequence for all the domain table; method 2. assigned each domain table a induvadule sequnce. Right now, the treebase-dev use method 2, but treebase code use method 1. That's the porblem. For changing the treebase code to method 2, we need more hands since there are 70 classes need to be modify( I can send out a instruction for what need to be done). I have tried a native id generator setup and hoped it can save the labor, but It is not like mysql, even with a native setup postgresql still need hiberbate to specify sequence name unless the defualt name (hibernate_sequence) is used. Also, for method 2, from now on, all these 70 sequence need to maintain the synchronizing with data insert and data migration of their table. I found some of them already lose the synchronise . Ok, First thing last, right now the treebase-dev refuse connection. Youjun On Fri, Dec 25, 2009 at 8:42 AM, William Piel <wil...@ya...> wrote: > > On Dec 23, 2009, at 12:25 PM, Vladimir Gapeyev wrote: > > > I think we need someone who is more aware about what is going on in TB2 > (Rutger? Bill?) to resolve this. > > Rutger would know. > > One of the early bugs after the DB2->Pg migration was that new records > generated an uncaught exception because sequences had not been setup -- so > Rutger went through an added sequence definitions for various tables. It's > not impossible that sequences were added some for tables where Hibernate was > already taking care of this, causing a clash. > > Personally, I would favor having Pg take care of all the sequences, since I > guess this would make it easier for alternative connections to the database > to add records, bypassing the Java. (not that this is recommended, condoned, > or in any way planned for the future -- But it gives us that flexibility, > no?) But obviously I leave this up to the experts (y'all). > > bp > > > > > > > ------------------------------------------------------------------------------ > 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 > |