From: SourceForge.net <no...@so...> - 2004-06-18 17:28:46
|
Bugs item #973979, was opened at 2004-06-16 17:08 Message generated for change (Comment added) made by kal_ahmed You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=391879&aid=973979&group_id=27895 Category: Hibernate Impl Group: TM4J 0.9.4 >Status: Pending >Resolution: Fixed Priority: 7 Submitted By: Andy Peel (atpeel) Assigned to: Kal Ahmed (kal_ahmed) Summary: Exception when creating two topics with the same base name Initial Comment: If I create two topics with the same base name, I get this exception: Message: testUpdateTopic_SameBaseName(test.client.TestTopicDelegate): Source exception thrown: org.tm4j.topicmap.TopicMapRuntimeException: Cause: java.sql.SQLException: ERROR: syntax error at or near "topic_types" at character 15 Cause:ERROR: syntax error at or near "topic_types" at character 15 The problem seems to be inside org.tm4j.topicmap.hibernate.TopicImpl.replaceTopicReference() where the SQL query generated includes the fragment "update ignore". The ignore keyword only seems to work on BDB/MySQl, whereas I'm using PostgreSQL. ---------------------------------------------------------------------- >Comment By: Kal Ahmed (kal_ahmed) Date: 2004-06-18 18:28 Message: Logged In: YES user_id=176992 Fixed error in the static merging code that caused this exception. Waiting on confirmation that the fix actually works on PostgreSQL... ---------------------------------------------------------------------- Comment By: Kal Ahmed (kal_ahmed) Date: 2004-06-17 20:13 Message: Logged In: YES user_id=176992 Sorry, I misunderstood the problem. I need to take a closer look at that SQL update. I used SQL directly for this operation for perfomance, but my simple update statement can violate key constraints (especially when merging on names or subject indicators I think). I *think* that there must be a way to do what I want without temporarily violating key constraints. ---------------------------------------------------------------------- Comment By: Andy Peel (atpeel) Date: 2004-06-17 10:11 Message: Logged In: YES user_id=1064816 Hi Kal, I'm pretty sure that won't make a difference - the SQL query in TopicImpl includes the IGNORE keyword, and as far as I can make out, that only works with BDB/MySQL. I even tried the query directly using psql, but to no avail. Andy. ---------------------------------------------------------------------- Comment By: Kal Ahmed (kal_ahmed) Date: 2004-06-16 19:10 Message: Logged In: YES user_id=176992 I wonder if this is a Hibernate problem. There was a new Hibernate release on June 1st (2.1.4) - perhaps it is worth giving that a spin to see if the Postgres problem got fixed ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=391879&aid=973979&group_id=27895 |