Bug in QueryBuilder. addUpdateColumn(RDBColumn column, Object value) or may be not

João Paulo Ribeiro <[email protected]> Tue, 02 Aug 2005 13:07:33 +0100
Newsgroups gmane.comp.java.enhydra.dods
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1122984469-1759-95
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi.

I' m using dods 6.5.1 and im having an error when using the QueryBuilder 
addUpdateColumn(RDBColumn column, Object value) method.
What is happening is that i'm working with a postgresql (7.4) and the db 
give me an error (org.postgresql.util.PSQLException: ERROR: syntax error 
at or near ".") when executing an update query with FullColumnName 
(table_name.column_name) in the SET part of the query.
For exemple:

UPDATE message SET message.text="hello world"

the correct sentence should be

UPDATE message SET text="hello world"

The last one work fine and the first one give me the 
org.postgresql.util.PSQLException.

Im not sure but i think its not SQL92 compatible. I dont know if it work 
with other RDBMs but it doesn't with Postgresql.

What i propose is to do a little change to the method 
addUpdateColumn(RDBColumn column, Object value)  to use the method 
getColumnName() instead of the method getFullColumnName().

The method addUpdateColumn(RDBColumn column, Object value) will be 
changed from

public void addUpdateColumn(RDBColumn column, Object value) {
        _addUpdateColumn(column.getFullColumnName(), value);
}

to

public void addUpdateColumn(RDBColumn column, Object value) {
        _addUpdateColumn(column.getColumnName(), value);
}

For the moment im using the deprecated method  addUpdateColumn(String 
column, Object value) as workaround but i will be happy if this change 
could be made.

Best regards.
João Paulo Ribeiro

-- 
João Paulo Ribeiro | Sénior Software Engineer
[email protected]

PHONE: + 351 253 305 250 
FAX  : + 351 253 305 250
www.mobicomp.com
 
________________________________________________________________

About Solutions | Wireless World

CONFIDENTIALITY NOTICE: This message, as well as existing attached files, is confidential and intended exclusively for the individual(s) named as addressees. If you are not the intended recipient, you are kindly requested not to make any use whatsoever of its contents and to proceed to the destruction of the message, thereby notifying the sender. 
DISCLAIMER: The sender of this message can not ensure the security of its electronic transmission and consequently does not accept liability for any fact which may interfere with the integrity of its content.



------------=_1122984469-1759-95
Content-Type: text/plain; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: 8bit


--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

------------=_1122984469-1759-95--