Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Populate ID from sequence


Former Community Member


I want to populate my table's ID with a sequence. I have made a table and sequence in Oracle

my table is as follow;


and the sequence;


Now my model looks like;

<model xmlns="http://ns.adobe.com/Fiber/1.0">

      <annotation name="DMS">

            <item name="datasource">java:/comp/env/jdbc/oracle</item>

            <item name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</item>


      <entity name="Seqtest" persistent="true">

            <annotation name="ServerProperties" ServerType="LCDS"/>

            <annotation name="DMS" Table="N2B_DEV.SEQTEST"/>

            <annotation name="VisualModeler" width="115" height="62" x="307" y="121"/>

            <id name="myid" type="long" generated="true">

                  <annotation name="DMS" ColumnName="ID" strategy="SEQUENCE" generator="SEQTEST_SEQ"/>


            <property name="name" type="string" length="10">

                  <annotation name="DMS" ColumnName="NAME"/>




But when I try to deploy it I get the following error:


Any ideas on what am I doing wrong?

All help is appriciated

2 Replies


Level 1

I'm having the same problem. It doesn't seem to work. Adobe's documentation is so poor that a simple task as this takes hours to do. This one I think is note even possible.


Level 3

This could very well be a bug. If so, it may be that there is a missing annotation in the generated entity bean as adnan saw:


If this is the case, which I have not yet verified, there should be at least one workaround. That workaround would be to save the generated entity bean to disk and add the missing annotation. You'd then need to compile the code, add it to the classpath and set an element in the model so that this code is used instead of the default in-memory implementation.

I'll get back to the forums on this when I have more complete information.