Primary key issue in toplink workbench

Hi All,
I am getting No primary keys specified in (xxx is the table name) table error in workbench.
I my table,don't have any primary keys,i try to do direct to field mapping for all the fields with the table.
After mapping,was getting this warning.
Is there any mandatory thing in toplink workbench that we need to have atleast one primary key defined in a table.
Please let me know!!!!!!!!!!!!
Appreciate your hekp............

Yes, it needs to know how to uniquely identify the row to do deletes and updates, etc. If you have no PK, then actually every field is needed to uniquely identify the row, and therefore just slect every field in the MW as being the PK... Note that the PK specified in the MW doesn't have to actually be the PK on the database, it just has to be unique for when TL does update/delete, etc.
- Don

Similar Messages

  • ODI - Primary Key issue

    Hi ,
    I have a primary key constraint in the target datastore. Thats mapped to field in the source which is not primary key. How can I check that , when I map from source to target primary key constraint is not violated ( I checked DISTINCT and UNIQUE as filter condition , but its not accepting the format. Give me the exact format)

    Hi ,
    My requirement is like I have a primary key in one of the fields of target column. That field is mapping to a field in source which is not a primary key . Source field can have duplicate values. I have to filter out that values when it enters to the target field. I used "DISTICT" keyword in the target datastore. But that will check only for "DISTINCT" records. I cannot applu "DISTICT" for individual field.
    For EX:
    SOURCE : TARGET
    DEPT CLASS SUBCLASS DEPT(primary key) CLASS
    1 1 1
    1 2 2
    1 3 3
    2 2 1
    2 1 2
    2 3 3
    If I use "DISTINCT" then it will choose ( 1 1,1 2,1 3,2 2,2 1,2 3) . But that will violate the primary key constraint.
    Edited by: rameshchandra85 on Nov 29, 2008 9:11 PM

  • Primary key issue with adf Entry Form.

    Hi All,
    i'm using jdev version 11.1.1.5.0
    use case: i have create simple entry form based on Eo and Vo using database table like student(enrollment no,name address)
    where enrollment no is primary key.
    so when i have create a record i have set enrollment no in entity impl class of this eo create method using some logic based on my need like(20130001)
    for that i have read highest no from database field and assign to enrollment no field when user create record.
    so when user create record second time then enrollment no is 20130002. and other detail like name and address user fill and commit record. and it is fine.
    but problem is that when two user access same form at a time and create record so both have get same primary key like 20130003 because in current time in database maximum value is 20130002.
    so which user  commit record first it record will save on database and second user get error message because of primary key violation.
    so my question is that where we generate primary key value for record so when multiple user access form have get different primary key value. and in my use case i can't use sequence and any autoincrement no
    because i have patter for primary key.
    Thanks in Advance
    Manish

    Hi,
    Dimitar and Frank
    thank for reply.
    How can i apply non-concurrent DB lock can you please explain.(because lock method on entity impl not work when user create new row as per documentation)
    http://docs.oracle.com/cd/B14099_19/web.1012/b14022/oracle/jbo/server/EntityImpl.html#lock__
    i have write following line of code in entity impl class to set primary key value(reqid)-
        @Override
        protected void prepareForDML(int i, TransactionEvent transactionEvent) {
             super.prepareForDML(i, transactionEvent);
            this.setReqid(genReqid());
        public String genReqid() {
            String reqby = this.getReqby();
            String qry =
                "SELECT nvl(MAX(TO_NUMBER(SUBSTR(REQID,7))),0)+1  FROM STM_REQHDR WHERE REQBY=? AND REQTYPE<>'M' and substr(reqid,1,2)<>'MT' AND SUBSTR(REQID,1,3)<>'PAY'";
            PreparedStatement ps = null;
            String no = "";
            try {
                ps = getDBTransaction().createPreparedStatement(qry, 0);
                ps.setString(1, reqby);
                ResultSet rs = ps.executeQuery();
                if (rs.next()) {
                    no = rs.getString(1);
                ps.close();
            } catch (Exception e) {
                System.out.println("Exception in Gen req id ==>" + e);
            String reqno = reqby + String.format("%6s", no).replace(' ', '0');
            return reqno;
    but when i run form in debug mode and two user commit concurrent manner only one time code block is executed who first commit. and second user got error message.
    thanks
    Manish

  • Primary key issue

    Hi all,
    I'm new here, and I have a stupid problem, I think. If someone could help me, I'll be grateful.
    I have to build a very simple JSP application using a few database tables, providing the base functionality: insert, update, delete, search.
    I'm using Oracle 8.1.7, and JDeveloper 9.0.3
    One table looks like that:
    CREATE TABLE TEST (
    sPrimaryKey varchar2(30) not null,
    sField varchar2(100)
    ALTER TABLE TEST
    ADD ( CONSTRAINT test_id_pk
    PRIMARY KEY (sPrimaryKey)
    I'm using a sequence for generating primary key...
    CREATE SEQUENCE test_seq
    START WITH 100
    INCREMENT BY 1
    NOCACHE
    NOCYCLE;
    ... and a trigger before insert for seting the new value of the primary key.
    CREATE OR REPLACE TRIGGER BI_TEST
    BEFORE INSERT ON TEST
    FOR EACH ROW
    DECLARE
    new_id integer;
    BEGIN
    select test_seq.nextval into new_id from dual;
    :new.sPrimaryKey := 'AAA' || new_id;
    END;
    I have created a BC4J. How can I insert a new row into that table using a BC4J from an HTML form, within a JSP page, without providing the primary key, by hand, and let the trigger and sequence do that?
    Thank you!
    Razvan

    I'm using a sequence for generating primary key...Change the attribute type for sPrimaryKey to be a DBSequence attribute type. It assumes you have an insert-trigger that fills in the correpsonding numeric column.

  • Primary Key Issue With Creating Tables

    Hi,
    I have the following scripts to create my two tables in oracle 10g, i was wondering wether or not i had correctly set up my primary key or if there is a better way of doing it than the way i have.
    Here are my two scripts for my tables:
    CREATE TABLE CUSTOMER (
    fname varchar2(15) NOT NULL,
    lname varchar2(20) NOT NULL,
    age varchar2(3) NOT NULL,
    custAreaCode number(5) NOT NULL,
    custNumber number(6) NOT NULL,
    constraint cust_pk PRIMARY KEY (custAreaCode),
    constraint cust_pk2 PRIMARY KEY (custNumber),
    constraint age_chk CHECK (age >=18 AND age <150)
    CREATE TABLE PHONECALL (
    startDateTime smalldatetime NOT NULL,
    custAreaCode number(5) NOT NULL, ---Reference PK From Customer Table
    custNumber number(6) NOT NULL, ---Reference PK From Customer Table
    dialledAreaCode number(5) NOT NULL,
    dialledNumber number(6) NOT NULL,
    crgPerMinute number number (3,1) NOT NULL,
    endDateTime smalldatetime NOT NULL));
    I am not sure if i have referenced the primary keys correctly in the PHONECALL table.
    Thanks in advance :)

    Hi,
    You want like this below ? I think that smalltime data type is not a valid type. Other thing, this is not a rule, but I advice you to put the primary key columns as the first columns of your table. One question: There is no PK on the phonecall table ?
    SGMS@ORACLE10> create table customer (
      2  custareacode number(5) not null,
      3  custnumber number(6) not null,
      4  fname varchar2(15) not null,
      5  lname varchar2(20) not null,
      6  age varchar2(3) not null,
      7  constraint cust_pk primary key (custareacode),
      8  constraint cust_uk unique (custnumber),
      9  constraint age_chk check (age >=18 and age <150)
    10  );
    Table created.
    SGMS@ORACLE10> create table phonecall (
      2  custareacode number(5) not null constraint fk_phone_cusarecode_customer references customer,
      3  custnumber number(6) not null constraint fk_phone_custnumber_customer references customer,
      4  startdatetime date not null,
      5  dialledareacode number(5) not null,
      6  diallednumber number(6) not null,
      7  crgperminute number (3,1) not null,
      8  enddatetime date not null);
    Table created.
    SGMS@ORACLE10> select table_name,constraint_name,constraint_type from user_constraints
    2 where table_name in ('CUSTOMER','PHONECALL') and constraint_type in ('P','U','R');
    TABLE_NAME                     CONSTRAINT_NAME                C
    CUSTOMER                       CUST_PK                        P
    CUSTOMER                       CUST_UK                        U
    PHONECALL                      FK_PHONE_CUSARECODE_CUSTOMER   R
    PHONECALL                      FK_PHONE_CUSTNUMBER_CUSTOMER   RCheers

  • MAP 9.1 - Inventory is scanned but failed during Assessment, Duplicate Primary Key

    Hi MAP team, saw the similar thread but didn't want to hijack it if it's a different root cause.
    We have a client using MAP for data collection that is having failures with generating the assessment. In the MAPToolkitLog, we get this:
    “Microsoft.AssessmentPlatform.MapException: Caught SqlException running the stored procedure [WinClient_Assessment].[LicensingAssessmentProc]. ---> System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'LicensingAssessment_pk'. Cannot
    insert duplicate key in object 'WinClient_Assessment.LicensingAssessment'. The duplicate key value is (4d74950a-3c31-4b7e-9464-12fd8ae03942).”
    Tracing it down it looks like there are two entries for a DeviceNumber under Win_Inventory.SoftwareLicensingProducts, with these two descriptions: “Windows Operating System - Windows(R) 7, RETAIL channel”, and “Windows Operating System - Windows(R) 7, OEM_SLP
    channel”. So two lines are trying to get created for an OEM and a RETAIL line in the LicensingAssessmentProc, causing a duplicate PRIMARY KEY and hence the issue with the assessment. Is this an existing bug and if so is there a quick way to resolve it so we
    can conduct the assessments? The issue is that we cannot run additional scans to improve coverage as it wants us to refresh the assessment before letting us run another scan.
    Thank you,
    Nick

    Following up on this, digging into the data it looks like "Windows(R) 7, OCUR add-on for Ultimate,HomePremium,Enterprise,Professional,ServerHomePremium,Embedded" is getting flagged as an OS and being included in the Win_Inventory.SoftwareLicensingProducts,
    conflicting with the actual OS line. When I deleted those rows the duplicate primary key issue was resolved and we were able to process assessments. Not sure if we can run additional scans on that database, will check soon.
    This is a pretty inconvenient way to get around this bug however, can this be addressed without having to delete SQL rows, or is this an edge case that needs to be caught in the filtering in the next release?

  • Mapping tables with no primary key defined

    Hi!
    I was just wondering if it's possible to map a table with no primary key? The reason why is that I have a logging table that I want to access, which is built very simple and the only useful filtering criteria that I'll be using there is a date column.
    Regards,
    Bjorn Boe

    TopLink requires that an object have a primary key to determine identity, perform caching, and database updates and deletes. It is best to define a primary key in all your objects; a sequence number can be used if the object has no natural primary key. The primary key does not have to be defined on the database, as long as a set of fields in the table are unique you can define them to be the primary key in your TopLink descriptor.
    If your table truly has no primary key, nor unique set of fields, it is still possible to map the table with some restrictions. If you disable caching, and mark the object as read-only, and never update or delete the object, you can map it for read-only purposes.
    You will need to do the following:
    - Set any field as the primary key to avoid the validation warning.
    - Set the cache type to NoIdentityMap.
    - Set the descriptor to be read-only.

  • JCA DB Adapter - merge - changing Primary Key

    Hello,
    I have an OSB business service that does a merge operation using a JCA DB Adapter. I recently changed the primary key of the table it's merging into, so also changed the toplink file of the business service (manually via sbconsole).
    However, in certain conditions, I'm getting an ORA-00001 error (JCA-11616). i.e. the merge is trying to do an insert that the violates primary key of the table.
    Should I have also made a change to something other than the business service? The table WSDL and XML don't mention the primary key as far as I can tell...
    Any ideas?
    Cheers

    That is probably a database error. If you changed the primary key of the toplink file to be less restrictive than the compound key in the database, you could potentially get this error. You need to make sure you have the primary keys or unique constraint columns from the database in the toplink file. You can then add additional columns to the toplink file based on your business logic, but never remove a database primary key from the file because the service could try a invalid insert.

  • Primary Key problem in 11g - Known issue 6894412

    Hi Everyone:
    We are on JDeveloper 11.1.1.4, and JHeadstart 11.1.1.2.46. This thread originally started on the JHeadstart forum and can be seen at: Problem with LOV's in 11g
    We are converting our 10g application to 11g. We have an established Oracle database that does not use pre-populated primary keys that are sequence number. Our database has composite keys and the integrity of those composite keys are established by foreign key constraints to edit tables. This approach has worked extremely well for us for over a decade, the logic of the database has been designed so that the database protects itself through the elimination of cascade deletes where necessary, and cascade deletes as the business logic dictates. This will not be changing.
    In the database tables in which the 10g application has been displayed in the table format, after conversion to 11g, the LOV pop-ups are not working unless the SAVE button (or refresh of the browser) has been pressed. The first LOV pop-up will work, but as soon as you select a value from it, the next LOV pop-ups will not execute until the SAVE or REFRESH is done. This is only in table format. If the display format is form, our primary key LOV's work fine. In 10g, this functionality worked fine as long as we didn't use an "ADD ROW" button on a table format. The Add Row button caused the primary key values to be returned to the application, but not be displayed on the screen. A refresh would then show them.
    From the initial investigation in the JHeadstart forum, I realize that we are hitting the "Primary Keys from Model" 6894412 problem that is listed in the 11.1.1.4 Release Notes. We have spent many, many hours establishing a re-usable .jar file of all of the entities of this very large database as suggested by JDeveloper Best Practises (http://download.oracle.com/docs/cd/B31017_01/web.1013/b25947/bcadvgen007.htm). This has worked very well for us in 10g - define all the entity specifics in one place, once, then every application can re-use them. Productivity at its finest. Therefore, we cannot make fake columns in our database in order to fix this "limitation" in 11g. We have many complex parent/child/child tables to put into our application which will not work unless our entities have the primary keys properly defined. I have tried to implement the workaround that was found in the release notes, but have been unable to get it to work.
    I have created a testcase with the HRSchema by adding a table to that Schema that I can provide the SQL commands for, but I do not know who in Oracle support to send it to. Could someone please provide me with the information on who to contact. I have, I believe, taken all the steps as established in the release notes for this problem and have clearly documented the changes in the .jsff page, but the problem still exists. Clearly, I am doing something wrong, or need more information.
    Thank you in advance
    Mary
    UofW

    Frank:
    I thank you for your reply.
    I have been working on the JHeadstart forums for so long, I actually forgot how to submit things to Metalink, and now that I have done it again...SR #3-3101357281 for this issue....I realize why I blocked out using Metalink from my memory.
    It took me an incredible amount of time to fill that SR in, then after completing everything, I was sent a request by the person assigned to the SR to repeat the instructions of how to run my testcase. I had already filled out all of the instructions on how to run the testcase in the "Notes to Oracle" section of the upload step. Almost every time I send something to Metalink, I have to repeat things. It seems as though they aren't read fully and any reason at all is used to send them back to the client.
    My dealings with Metalink have been very, very frustrating. My colleagues share this sentiment.
    Mary
    UofW

  • Issue with INSERT INTO, throws primary key violation error even if the target table is empty

    Hi,
    I am running a simple
    INSERT INTO Table 1 (column 1, column 2, ....., column n)
    SELECT column 1, column 2, ....., column n FROM Table 2
    Table 1 and Table 2 have same definition(schema).
    Table 1 is empty and Table 2 has all the data. Column 1 is primary key and there is NO identity column.
    This statement still throws Primary key violation error. Am clueless about this? 
    How can this happen when the target table is totally empty? 
    Chintu

    Nope thats not true
    Either you're not inserting to the right table or in the background some other trigger code is getting fired which is inserting into some table which causes a PK violation. 
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Every table need primary key in toplink mapping to fetch the data

    Hi everyone,
    we are working on toplink mapping , it neccessary every table needs primary key. if yes, gave me example.

    Hi everyone,
    Alterations in database will not be automatically reflected in toplink so, there is any alternative
    with regards
    abusufian

  • Auto_increment issue faced with primary key

    create table test(
    snum int not null auto_increment,
    course_id varchar(15),
    primary key(course_id, snum))
    create table testt(
    course_id varchar(15),
    pre_id varchar(15),
    foreign key (course_id) references test(course_id),
    foreign key (pre_id) references test(course_id))
    the above two table test has a primary key (snum, course_id) . course_id, which is being referenced in below table testt as a foreign key.
    i have an issue when trying to create a table test wit primary key (course_id, snum) that Error code 1075, SQL state 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key. but when place primary key(snum, course_id) it's working in this case i wasn't able to use course_id as foreign key for below table testt.
    could you please suggest me how to resolve this issue.

    The description of this forum is "Discussion of Oracle SQL and PL/SQL issues "
    MySQL Forums are at http://forums.mysql.com/
    Hemant K Chitale
    Edited by: Hemant K Chitale on Jan 11, 2011 2:56 PM

  • Toplink map: No primary keys defined for table, what can I do?

    I have the following DDL:
    CREATE TABLE CAM_CUSTINFO.CUSTOMERMASTER (
         CUSTID CHAR(15) NOT NULL,
         BILLTOCUSTID CHAR(15) NOT NULL,
         GROUPID NUMBER(11) NOT NULL,
         CUSTSTATUS CHAR(1) NOT NULL,
         CUSTSTATUSDT DATE,
         NAMESHORT CHAR(10) NOT NULL,
         SINCEDT DATE NOT NULL,
         ADDDT DATE NOT NULL,
         FIRSTNAME CHAR(20) NOT NULL,
         MIDDLENAME CHAR(15) NOT NULL,
         LASTNAME CHAR(30) NOT NULL,
         SUFFIXNAME CHAR(15) NOT NULL,
         NAMETYPECD CHAR(1) NOT NULL,
         TITLE CHAR(15) NOT NULL,
         SALUTATIONCD CHAR(6) NOT NULL,
         COMPANYNAME CHAR(40) NOT NULL,
         PRIMADDRSEQBILL NUMBER(5) NOT NULL,
         PRIMADDRSEQSOLD NUMBER(5) NOT NULL,
         PRIMADDRSEQSHIP NUMBER(5) NOT NULL,
         NAME2 CHAR(40) NOT NULL,
         CUSTLEVEL CHAR(1) NOT NULL,
         TAXABLECD CHAR(1) NOT NULL,
         TAXPAYERID CHAR(14) NOT NULL,
         CHGID CHAR(10) NOT NULL,
         CHGDT DATE,
         BILLCURRENCYCD CHAR(10) NOT NULL,
         BILLDAY NUMBER(5) NOT NULL,
         HOLDBILLINGIND CHAR(1) NOT NULL,
         PAYMENTTERMCD CHAR(10) NOT NULL,
         CANCELSTATUSIND CHAR(1) NOT NULL,
         CANCELSTATUSDT DATE,
         INDUSTRYCD CHAR(30));
    CREATE UNIQUE INDEX CAM_CUSTINFO.PK_CUSTOMERMASTER ON CAM_CUSTINFO.CUSTOMERMASTER (CUSTID);
    CREATE INDEX CAM_CUSTINFO.IX_CUSTOMERMASTERBILLTOCUSTID ON CAM_CUSTINFO.CUSTOMERMASTER (BILLTOCUSTID, CUSTID);
    CREATE INDEX CAM_CUSTINFO.IX_CUSTOMERMASTERCOMPNAME ON CAM_CUSTINFO.CUSTOMERMASTER (COMPANYNAME);
    CREATE INDEX CAM_CUSTINFO.IX_CUSTOMERMASTERGROUPID ON CAM_CUSTINFO.CUSTOMERMASTER (GROUPID);
    CREATE INDEX CAM_CUSTINFO.IX_CUSTOMERMASTERNAME ON CAM_CUSTINFO.CUSTOMERMASTER (LASTNAME, FIRSTNAME);
    CREATE INDEX CAM_CUSTINFO.IX_CUSTOMERMASTERBILLDAY ON CAM_CUSTINFO.CUSTOMERMASTER (BILLDAY, CUSTID);
    CREATE INDEX CAM_CUSTINFO.I_00_INDCD ON CAM_CUSTINFO.CUSTOMERMASTER (INDUSTRYCD);
    How do I add this to a Toplink Map? I always get the error:
    Descriptor Custaddr -> Some mappings are incomplete.
    Descriptor Custaddr -> No primary keys specified in CAM_CUSTINFO.CUSTOMERMASTER table.
    Descriptor Custaddr -> The following Query Keys do not have associated database fields: adddt, address1, address2, address3, address4, addressseqnum, billtoaddr, chgdt, chgid, city, country, county, custid, department, descr, effstatus, fax, fips, geocode, houseType, incitylimit, latitude, longitude, num1, num2, phone, phonecountry, phoneext, phonesecondary, postal, secondaryext, shiptoaddr, soldtoaddr, state, taxcd
    Mapping adddt -> No database field is selected.
    Mapping address1 -> No database field is selected.
    Mapping address2 -> No database field is selected.
    Mapping address3 -> No database field is selected.
    Mapping address4 -> No database field is selected.
    Mapping addressseqnum -> No database field is selected.
    Mapping billtoaddr -> No database field is selected.
    Mapping chgdt -> No database field is selected.
    Mapping chgid -> No database field is selected.
    Mapping city -> No database field is selected.
    Mapping country -> No database field is selected.
    Mapping county -> No database field is selected.
    Mapping custid -> No database field is selected.
    Mapping department -> No database field is selected.
    Mapping descr -> No database field is selected.
    Mapping effstatus -> No database field is selected.
    Mapping fax -> No database field is selected.
    Mapping fips -> No database field is selected.
    Mapping geocode -> No database field is selected.
    Mapping houseType -> No database field is selected.
    Mapping incitylimit -> No database field is selected.
    Mapping latitude -> No database field is selected.
    Mapping longitude -> No database field is selected.
    Mapping num1 -> No database field is selected.
    Mapping num2 -> No database field is selected.
    Mapping phone -> No database field is selected.
    Mapping phonecountry -> No database field is selected.
    Mapping phoneext -> No database field is selected.
    Mapping phonesecondary -> No database field is selected.
    Mapping postal -> No database field is selected.
    Mapping secondaryext -> No database field is selected.
    Mapping shiptoaddr -> No database field is selected.
    Mapping soldtoaddr -> No database field is selected.
    Mapping state -> No database field is selected.
    Mapping taxcd -> No database field is selected.
    This isn't in the Developer's guide?
    Detailed information would be greatly appreciated.
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Todd,
    Follow these steps.
    1. First map your CustomerMaster descriptor either manually or by using the automap wizard.
    2. Specify the primary key(s) (it does not have to be on the database) by checking appropriate fields listed under the "Primary Keys:" in "Descriptor Info" tab.
    3. Run the mapping status report to make sure you have no errors in mapping.
    Hope this helps.

  • Issues mapping table with no primary key?

    As an exercise, I'm building a small application mapping a set of mySQL tables, using JPA. I have one table that does not have a primary key. I can see a workable natural composite key that will be unique in my data. Will I have any issues if I define the composite primary key in my JPA code, even though the table doesn't have a primary key defined?

    As long as the primary key do not change after the constructor is called it should work without any problem. But your select may be show without an index.

  • Issue with getting sequance number from db in EO for a primary key column

    Hello Experts,
    we are working on ADf 11.1.1.2.
    we are facing issue with sequence number in our UAT instance.
    dev instance and sit instances did not gave any issues.
    We have one EO in that for one attribute we have given the value as
    new oracle.jbo.server.SequenceImpl("XXOZF_QA_CODE_S", object.getDBTransaction())).getSequenceNumber()
    in order to get the primary key column value from db sequance .
    <TransientExpression><![CDATA[(
    new oracle.jbo.server.SequenceImpl("XXOZF_QA_CODE_S", object.getDBTransaction())).getSequenceNumber()
    ]]></TransientExpression>
    now the issue is "I have incremented the sequence number through SQL plus from 10 to 20. And created a record on a VO which is based on above EO.
    But the sequence iam getting is 11 instead of 21."
    This is happening only in our uat instance all other instances are working fine.
    Can any one tell us how this frame work is still pointing tho the old sequnce number.
    regards
    Gayaz

    Also make sure that your sequence has NOCYCLE option.
    some thing like this:
    CREATE SEQUENCE test_seq
    START WITH 1
    INCREMENT BY 1
    NOCACHE
    NOCYCLE;

Maybe you are looking for

  • Problem with h:selectManyMenu

    using Oracle JDeveloper... wizard creates the following in jsp file...... <h:selectManyMenu       binding="#backing_chemDataEntry.selectManyMenu1}"       id="selectManyMenu1"> <f:selectItems value="#{compatibilityGroup.compatGrps}"                   

  • PHP page looks fine by itself, but CSS Divs fall apart on PHP include

    Hi everyone. Thanks for your help in advance, this problem I'm having really has me puzzled. The issue I'm having is, I have two php files. body.php with content to be included and index-3.php as the container. When I load body.php by itself in the b

  • Using oracle personal for developing java application?

    Can I use Oracle 9i Personal Edition for developing Java applications? Does it provide a JDBC Type 4 driver? Thanks a lot. [email protected]

  • Error in standard report EEs Entered and Left dt appearing as zeros

    Hi, When I am executing standard report S_PH9_46000223 EEs Entered and Left dates are appearing as 00000000. My observation was when the employment status was withdrawn dates were coming properly,  but on demand of my client I had to change the emplo

  • How to transfer a module between systems and change the system name?

    Hello, I would like to transfer a module I've built from one server to another, my questions are: 1. What will be the best way to do it? 2. The 2nd Server contains a System with the same queries but the system has a different alias. Suppose I don't w