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!

Insert row in ViewObject and Commit to DB

727941Jan 12 2010 — edited Jan 12 2010
Hi,
I am trying to insert new row inside VO and populate it with data. Here is the code:

Row rowForInsert = ts.createRow();
rowForInsert.setNewRowState(Row.STATUS_NEW);
rowForInsert.setAttribute("Act", rowData.getAttribute("ActId"));
rowForInsert.setAttribute("Date", dateForDB);
rowForInsert.setAttribute("Employee", "4583");
rowForInsert.setAttribute("Status", "1");
ts.insertRow(rowForInsert);
am.getTransaction().commit();


TS is ViewObjectImpl and AM i ApplicationModule.
Row is correctly inserted in VO but on commit I get the following error:
...
Caused by: oracle.jbo.InvalidOperException: JBO-26018: Entity TsTest cannot be posted to the database because it has no attributes set.
...

I've also tried to set row state to STATE_NEW, use ViewObject instead of ViewObjectImpl but still no luck
I'm using JDev 11.1.1.2.0

Thanks a lot,
Goran Milinovic
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2010
Added on Jan 12 2010
6 comments
3,169 views