Skip to Main Content

Java Development Tools

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!

findByKey does not fetch row

Srini MadNov 22 2016 — edited Jan 5 2017

Jdev version: 11.1.1.7.1

We are debugging a production issue and found a strange behavior on debugging. So opening this thread to discuss the same with the community. I shall keep the thread posted with what I find.

Scenario: View Object is based on ONE Entity Object that is based on a single attribute primary key. Now in certain flows, the below code does not seem to be fetching the row even though the row is present in database.

        ViewObjectImpl vo = this.getMyVO();

        Row[] rows = vo.findByKey(new Key(new Object[] { primaryKey}), 1);

        Row row = (rows != null && rows.length > 0) ? rows[0] : null;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 2 2017
Added on Nov 22 2016
8 comments
1,061 views