aspose file tools*
The moose likes Websphere and the fly likes Primary Key contains Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Primary Key contains "#" sign" Watch "Primary Key contains "#" sign" New topic
Author

Primary Key contains "#" sign

xin wen
Ranch Hand

Joined: Oct 11, 2002
Posts: 64
Hi friends,
I am using WSAD4.0.2, and some database tables' primary key contain "#" at the end. When I using these tables from WSAD, I got an error message "The column name, XXX#, is not a valid identifier".
I am not able to change the column name, does anyone know how to solve this problem?
Thanks you all so much!
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
create a view on that table with different column names.
xin wen
Ranch Hand

Joined: Oct 11, 2002
Posts: 64
Thanks Simon for replying,
Is this the only way to do it? 'Cause I have a lot of tables have that kind of fields, do we have another way to solve it? By the way, I use these tables to generate entity beans (CMP).
Thanks a lot!
[ April 16, 2003: Message edited by: xin wen ]
xin wen
Ranch Hand

Joined: Oct 11, 2002
Posts: 64
Hi, we create a view for that table, but I do not know how to generate entity bean using that view. Does anyone know how to do it?
Thanks a lot!
M Dollenkamp
Greenhorn

Joined: Apr 17, 2003
Posts: 6
Hmm I though mapping entity beans to views was not supported in wsad 4.02.
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
running out of options...
xin wen
Ranch Hand

Joined: Oct 11, 2002
Posts: 64
Thanks for helping!
Is it supported on WSAD5.0? Can I map a CMP entity to a View in WSAD5.0?
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Primary Key contains "#" sign