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

João Paulo Ribeiro <[email protected]> Tue, 09 Aug 2005 12:02:40 +0100
Newsgroups gmane.comp.java.enhydra.dods
Message-ID <42F88D50.5080605__29376.4756447219$1123585414$gmane$org@mobicomp.com>
This is a multi-part message in MIME format...

------------=_1123585379-7913-86
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi!<br>
<br>
I want to thanks dods team for the change they made to QueryBuilder
addUpdateColumn(RDBColumn column, Object value) that fix the problem i
reported.<br>
But i'm curious: why do you have decided to keep the possibility to use
the column.getFullColumnName() for some databases? <br>
It was for compatibility reasons? Do you know a db that need it?<br>
<br>
Best regards and thanks again.<br>
Jo&atilde;o Paulo Ribeiro<br>
<br>
Jo&atilde;o Paulo Ribeiro wrote:
<blockquote cite="[email protected]" type="cite">Hi.
  <br>
  <br>
I' m using dods 6.5.1 and im having an error when using the
QueryBuilder
  <br>
addUpdateColumn(RDBColumn column, Object value) method.
  <br>
What is happening is that i'm working with a postgresql (7.4) and the
db
  <br>
give me an error (org.postgresql.util.PSQLException: ERROR: syntax
error
  <br>
at or near ".") when executing an update query with FullColumnName
  <br>
(table_name.column_name) in the SET part of the query.
  <br>
For exemple:
  <br>
  <br>
UPDATE message SET message.text="hello world"
  <br>
  <br>
the correct sentence should be
  <br>
  <br>
UPDATE message SET text="hello world"
  <br>
  <br>
The last one work fine and the first one give me the
  <br>
org.postgresql.util.PSQLException.
  <br>
  <br>
Im not sure but i think its not SQL92 compatible. I dont know if it
work
  <br>
with other RDBMs but it doesn't with Postgresql.
  <br>
  <br>
What i propose is to do a little change to the method
  <br>
addUpdateColumn(RDBColumn column, Object value)&nbsp; to use the method
  <br>
getColumnName() instead of the method getFullColumnName().
  <br>
  <br>
The method addUpdateColumn(RDBColumn column, Object value) will be
  <br>
changed from
  <br>
  <br>
public void addUpdateColumn(RDBColumn column, Object value) {
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _addUpdateColumn(column.getFullColumnName(), value);
  <br>
}
  <br>
  <br>
to
  <br>
  <br>
public void addUpdateColumn(RDBColumn column, Object value) {
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _addUpdateColumn(column.getColumnName(), value);
  <br>
}
  <br>
  <br>
For the moment im using the deprecated method&nbsp; addUpdateColumn(String
  <br>
column, Object value) as workaround but i will be happy if this change
  <br>
could be made.
  <br>
  <br>
Best regards.
  <br>
Jo&atilde;o Paulo Ribeiro
  <br>
  <br>
  <pre wrap="">
<hr size="4" width="90%">

--
You receive this message as a subscriber of the <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> mailing list.
To unsubscribe: <a class="moz-txt-link-freetext" href="mailto:[email protected]">mailto:[email protected]</a>
For general help: <a class="moz-txt-link-freetext" href="mailto:[email protected]?subject=help">mailto:[email protected]?subject=help</a>
ObjectWeb mailing lists service home page: <a class="moz-txt-link-freetext" href="http://www.objectweb.org/wws">http://www.objectweb.org/wws</a>
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Jo&atilde;o Paulo Ribeiro | Senior Software Engineer
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>

PHONE: + 351 253 305 250 
FAX  : + 351 253 305 250
<a class="moz-txt-link-abbreviated" href="http://www.mobicomp.com">www.mobicomp.com</a>
 
________________________________________________________________

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.</pre>
</body>
</html>


------------=_1123585379-7913-86
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

------------=_1123585379-7913-86--