Until Jdeveloper 12c for supplying primary key to your entity creation you could simply add a groovy expression in the primary key attribute's default expression like:
(new oracle.jbo.server.SequenceImpl("", adf.object.getDBTransaction())).getSequenceNumber()
However, running the same code in Jdeveloper 12 will throw following runtime exception:
General error during semantic analysis: JBO-25152: Calling the constructor for class oracle.jbo.server.SequenceImpl is not permitted.
Solution:
- Open EO in the source view.
- Search for trustMode="untrusted"
- Change it to trustMode="trusted"
This should work now.
No comments:
Post a Comment