logo       

Re: [enhydra] Bug in QueryBuilder. addUpdateColumn(RDBColumn column, Object: msg#00019

java.enhydra.general

Subject: Re: [enhydra] Bug in QueryBuilder. addUpdateColumn(RDBColumn column, Object value) or may be not

Hi!

I want to thanks dods team for the change they made to QueryBuilder addUpdateColumn(RDBColumn column, Object value) that fix the problem i reported.
But i'm curious: why do you have decided to keep the possibility to use the column.getFullColumnName() for some databases?
It was for compatibility reasons? Do you know a db that need it?

Best regards and thanks again.
João Paulo Ribeiro

João Paulo Ribeiro wrote:
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


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


-- 
João Paulo Ribeiro | Senior Software Engineer
jp@xxxxxxxxxxxx

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.

--
You receive this message as a subscriber of the enhydra@xxxxxxxxxxxxx mailing
list.
To unsubscribe: mailto:enhydra-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise