[jboss-dev-forums] [Design of JBoss Collaboration Server] - MailboxServiceImpl Bug

sappenin do-not-reply at jboss.com
Thu Aug 17 17:38:32 EDT 2006


When I try to retrieve messages via POP3, JBCS throws an error when it tries to call the "deleteMarked()" function.  I've tracked the error down to MailboxServiceImpl Line 772, where fastExpunge issues a native Postgres query that postgres doesn't like.

The broken code is:


  | 	session.createNativeQuery("delete from MessageData_BODYID b where b.MessageData_ID in (select m.id from MessageData m where m.deleted = true" + " and m.folder_id = :folder)").setParameter("folder", f.getId()).executeUpdate();   
  | 

In my SQL window, I was able to issue a SQL query as follows:


  | delete from MessageData_BODYID where MessageData_BODYID.MessageData_ID in (select m.id from MessageData m where m.deleted = true" + " and m.folder_id = :folder)
  | 

Basically, it appears that postgres doesn't like/allow the aliasing of tables (instead of "MessageData_BODYID as b where b.MessageData_ID", I just use the full table name "MessageData_BODYID where MessageData_BODYID.MessageData_ID").

That seems wierd to me, so I'm wondering if anyone has this problem with postgres.  If others concur, I'll post a JIRA task with a fix.

david

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965908#3965908

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965908



More information about the jboss-dev-forums mailing list