Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Selection criteria based on non-primary key columns in Custom-SQL

561998Feb 15 2007 — edited Feb 15 2007
Hi all,
Could anybody please tell me how to perform a search using non-primary key columns, The query is written in Workbench under Custom Sql --> Read Object. The Query goes something like this

select * from Employee where firstName like #name
where firstName is a Non-primary key column.

The Java Code goes like this
Employee empm = new Employee();
empm.setFirstName("John");
Employee employees = (Employee) session.readObject(empm);

This does not fetch me any values . I dont want the queries to be written in any java class. Is there Any other way to do it ??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2007
Added on Feb 15 2007
3 comments
961 views