[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjms-developer
Subject:    [openjms-developer] [ openjms-Bugs-891758 ] DB table uses reserved word as column name
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2004-05-06 11:51:46
Message-ID: E1BLhPm-0000iB-00 () sc8-sf-web4 ! sourceforge ! net
[Download RAW message or body]

Bugs item #891758, was opened at 2004-02-06 23:33
Message generated for change (Settings changed) made by tanderson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=891758&group_id=54559

Category: persistence
>Group: v0.7.6
Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Alex M. Schiroky (schiroky)
Assigned to: Tim Anderson (tanderson)
Summary: DB table uses reserved word as column name

Initial Comment:
The table "Users" has a column named "password" but 
this is a reserved word for Interbase, so I change the 
name in the create table script for something 
like "passwd" or "passwordx" only to test and the 
OpenJMS have working since it except when some data 
exist in these table. I take a look in your persistence 
layer and found the problem and have a simple solution 
for it.

In the "org.exolab.jms.persistence.Users" class all 
methods use setter's and getter's by index except the 
last "load" method who use them by name, look:

select = connection.prepareStatement("select * from 
users");
set = select.executeQuery();
while (set.next()) {
 	String name = set.getString("username");
 	String password = set.getString("password");
}

To keep the same approach of the other methods and 
works with Firebird, maybe with another one, I apply this 
small change:

select = connection.prepareStatement("select * from 
users");
set = select.executeQuery();
while (set.next()) {
 	String name = set.getString(1);
 	String password = set.getString(2);
}

----------------------------------------------------------------------

Comment By: Tim Anderson (tanderson)
Date: 2004-05-06 21:47

Message:
Logged In: YES 
user_id=557161

Fixed in CVS.
I've changed the create_interbase.sql script so that the 
'password' field is named 'passwd' instead.

Fix will be available in the 0.7.6.1 release.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=891758&group_id=54559


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
openjms-developer mailing list
openjms-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openjms-developer
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic