Adding ORDER BY to auto generated queries

Hi,
I'm using Toplink with JDeveloper and I've create two tables "speeches" and "speechWords" which are related in a one-to many relation.
I want to use the auto generated method of "speeches" to its "speechWords" rows and it works fine but I need to add an ORDER BY based on one of "speechWords"'s columns.
How can I do that? I know I can write a custom method that does the same but I prefer not too.
Thanks

Hi,
When you use autogenerated in Toplink ,ids gets generated in descending order by default and hence you can use the same in speechWords.
If you would like to still sort the entry in speechWords after persist or Insert operation,you can define the sort login in preInsert or prePersist() event life cycle
methods.So once record is inserted in SpeechWords using the autogeneration applied on speeches table,in the postPersist() event life cycle method implement the sort logic based on column.
Regards,
P.Vinay Kumar

Similar Messages

  • Auto generated service PR from maint, order

    Dear Experts,
    As you know while processing external services using control key PM03, a service PR will be generated for the service selected from the agreement or contract & from there we will create PO.
    Here in my case while creating PO from auto generated PR it is not carrying the condition type ( Discount entered the contract).Instead of that it gives the option to enter the condition type in the drop down list.Then we can select the condition type as discount & process the order.
    where as for the same service from the same agreement,if we create the PO from the manually created PR (not the auto generated from maintenance order) it carries the condition type of agreement (discount) to PO & the discounted price will be displayed automatically.
    Why it is not happening to auto generated PR? is there any particular settings are available? is there any notes available?
    Please help me out to come out of this problem.
    Thanks & best regards,
    Praveen

    Dear,
    I am extremely sorry for this issue. there was some problem with the program & rectified the same.
    Thanks & Best regards,
    Praveen

  • Auto-Generated Number For All Users

    We're on Lync Server 2013, running a front-end pool consisting of 3 front-end servers. Users are VoIP enabled. We're seeing some inconsistent behavior while right-clicking an user and selecting the "Call" option. Even though the respective target
    users don't have an "Other" phone number set in AD, the Lync client seems to be somehow auto-generating a normalized entry and presenting this as an "Other" entry in the contextual menu that allows calls. The entry always begins with +1
    (425). Strange enough, this is the prefix used in some sample normalization rules in a Microsoft article
    here.
    Even though Dial Plans - to my understanding - shouldn't alter this (they only apply normalization rules for manually dialed numbers only), I've searched through all the normalization rules but there's none that start with +1 (425). I've also tried running
    ABSConfig, yet this tool crashes systematically on multiple machines (the Lync servers have updates dating from less than 2 months ago).
    Also - there's no normalization .txt file created in the ABFiles in the Lync Share, as in
    this article. Taking a look in the local GalContacts.db file shows the regular phone numbers, but not this one - hinting that it's something the Lync client creates on the fly. Additionally, no Lync Address Book Web Query is visible in Fiddler when browsing
    through the users' phone numbers in the Lync client.
    Adding to the problem is that some users see the "Other" entries, while others don't - eg. user X right clicks user Z and sees a wrong "Other" entry, while user Y right clicks user Z and doesn't see any wrong entry containing "Other".
    First question is what could trigger this behavior in the client ? Secondly, has ABSConfig.exe become broken by a recent update ?

    According to the 2nd article - I've created an empty Company_Phone_Number_Normalization_Rules.txt file and placed it in the Lync file share, in order to avoid any suspicion that the built-in file might be used. I've updated the address book but unfortunately
    can't restart the FE services at this time. There's no still no change in the client.
    Yet - the problem here is the numbers shown aren't present in the files making up the Lync address book inside the local user's sip profile folder.

  • Auto generated calls from ipcc UCCX?

    Dear All,
    I am using ipcc version 8.5. i have to add an feature in the contact center in which the system will auto generate calls to the customers for complaint managment and play a prompt with menu options that if complaint is resolved press one if not press 2.
    I am new to ipcc so please can anybody help with proper steps to make it working.
    we have a outbound licesnse.i tried another way doing it via a campaign but when i added a new compaign only agent based option was available so i am not left with the option to make ivr campaign for that.
    the second option is i tried to make a http triggered application. but i really dont know how to make it work. how to use get http info in the script and place call method.
    if any one can explain it in a simple way with proper steps it would be really appreciated.
    Best Regards
    Bureera Sabir

    According to the 2nd article - I've created an empty Company_Phone_Number_Normalization_Rules.txt file and placed it in the Lync file share, in order to avoid any suspicion that the built-in file might be used. I've updated the address book but unfortunately
    can't restart the FE services at this time. There's no still no change in the client.
    Yet - the problem here is the numbers shown aren't present in the files making up the Lync address book inside the local user's sip profile folder.

  • What is the best way to auto-generate pages at an interval?

    In order to minimize the server's workload we're exploring
    ways of auto-
    generating pages that have dynamic content throughout our
    website.
    I know we could use CFSCHEDULE and have it make an
    HTTPRequest as its
    operation to read the dynamic page then use output to write
    the resultant
    page. However, if an error occurs during the request, the
    result is can be a
    blank file.
    So would it be a better approach to use CFSCHEDULE to run a
    page that would
    have the error checking using CFTRY and CFCatch, and as a
    result, have a
    go/no-go in terms of overwriting the previous successful
    version of the file
    via cffile?
    Does anyone have an example of such a system that would keep
    me from re-
    inventing the wheel?
    Thanks for your help,
    Michael Brown
    Webmaster
    Texas Department on Aging and Disability Services

    Michael,
    i have a "refresh" page for monitoring updates on a client
    site... the only issue is that this page must be kept open but it
    does goes thru numerous data sources and updates any pages as
    needed.
    nice thing is that you can keep a running track of generated
    content (with links) and check for errors, etc...
    basically page has line
    <META HTTP-EQUIV="REFRESH"
    CONTENT="900;URL=home.cfm?pdg=1&pdgg=1&pncom=1&dtst=1">
    the 900 is seconds (15min) and it just calls itself each
    time. page has all functions and reporting written in
    maybe will work your requirements. rest is just tags to
    trigger queries, etc and keep out the nosy.

  • Auto generated types and ps1xml formatting files

    Hello,
    I'm using New-WebServiceProxy to work with a web service... when I call methods of the web service powershell auto generates types, for example, things like "Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1_webservices_awebservicepage_asmx.TheMethodReturnObjectType"
    1. should I just use that type name in my ps1xml formatting file? I'm wondering if that will be fragile... seems fragile like 'webServiceProxy1' for example, what if there is some scenario it uses '2'? Not sure if I can count on that being consistent?
    2. I started creating custom objects and adding my own type name to them so that type name could be used in the ps1xml file. This works fine. However so far it was for web service methods that returned single instance results.. now I hit a point where I'm
    calling a web service method that will return a collection... so I'm wondering if it would be better to just use the auto generated type name  in the ps1xml or, as I would need to do in this case, actually enter a foreach loop to create a new custom object
    for every object in the returned collection? In other words, for the web service methods I've used so far for this, I simply created my custom object and write-output... for the case of the collection, I would be new-object'ing and write-output'ing within
    that foreach loop.. wondering about performance issues, or if it's just overkill when I could just put that auto generated type name in the ps1xml file and be done with it... 
    not sure if I've asked that very clearly...
    essentially, I'm wondering if it's overkill (from a resource usage perspective) to be creating these custom objects in the case of when there will be a collection, with potentially hundreds of items, when the only reason I'm doing it is for display purposes...
    if it were not an autogenerated type I would simply use the type name in the ps1xml, I'm just not sure if I can do that in this case as I don't know if that typename will *always* be the same?
    any input would be appreciated, thanks

    Hi DJC,
    I haven't rexperienced this, however, to create a .ps1xml file, these examples may be helpful for you:
    Creating a module for powershell with a format file
    discutils / utils / DiscUtils.PowerShell / DiscUtils.Format.ps1xml
    about_Format.ps1xml
    I hope this helps.

  • HOW TO GET AUTO GENERATED PRIMARY ID KEY BACK FROM AN INSERT STATEMENT IN .

    Just recently I ran into a problem with what seems to be a deficiency in the Oracle Database. When trying to return an auto-generated key as is done in Microsoft's SQL database, it seems Oracle for whatever reason didn't add this capability, the key couldn't be passed back to the .Net call. After tinkering with the .Net software and talking with the Oracle techs, a decent work around to the problem (presented here) comes fairly close. Two things have to be done first before this will work. A sequence has to be created on the Oracle DB. Also a trigger has to be created against the table the keys are going to be returned from.
    The class works by passing to the function 'update_datasets_return' a DataSet with as many tables as you want. The function spins through the tables and put the keys in each row inserted. It's assumed the first row will either be the primary key or some numeric value. This can be changed by modifying the: dt.Columns(0).ColumnName
    Notice the word Inserted. On Updates and Deletes the key value is ignored because it's already present. The routine just updates the database as usual.
    So in other words you could send a table to the function with rows inserted, deleted, or updated and it will take care of them all. One routine for all.
    ' ======================================================================
    ' Created by SEF and Oracle SR: 5607364.993 This is a complete Redo
    ' of the initial concept. SEF...
    ' Sample of sequence and trigger at bottom.
    ' Uses the ODP.NET data provider.
    ' update_datasets_return: Goes thru each table in the dataset and
    ' updates, deletes, or inserts as needed.
    ' If inserting, a 'sequence counter' and a 'trigger'
    ' using the 'before insert' must be present. The sequence
    ' counter is set to auto increment by 1 starting at 1.
    ' The trigger is specific to the table.
    ' Create the trigger and sequence in the database or run the samples
    ' below in PL/SQL. Be sure the logon with a user that has enough rights.
    ' Routine assumes the first column is going to hold the sequence
    ' number. Actually any column could be used. Just change the
    ' dt.Columns(0).ColumnName to whatever you want or leave as default.
    ' The da_RowUpdated sub is where the 'sequence number' gets returned
    ' on each row that is inserted into a table. Routine is ignored on
    ' deletes and updates. SEF...
    ' =======================================================================
    Imports System
    Imports System.Data
    Imports Oracle.DataAccess.Client
    Imports Oracle.DataAccess.Types
    Public Class OracleUpdate
    Private Shared m_conn As OracleConnection
    Private Shared da As New OracleDataAdapter
    Private Shared dt As DataTable
    Private Shared conn As New OracleConnection
    Private Shared dr As DataRow
    Private Shared astep As Long
    Private Shared rwIndex As Integer = 0
    Private Shared tblIndex As Integer = 0
    Public Shared Function update_datasets_return(ByVal constr As String, ByVal ds As DataSet) As DataSet ''ByRef ds As DataSet)
    Dim selectstmt As String
    m_conn = New OracleConnection(constr)
    Try
    m_conn.Open()
    Catch ex As Exception
    Throw New ArgumentException(" Error: connection lost." & ex.Message)
    End Try
    For Each dt In ds.Tables
    ''Uncomment the code only if auto numbering
    ''is NOT turned on for the table being updated. SEF...
    ''rwIndex = 0
    ''For Each dr In dt.Rows
    '' Try
    '' Select Case dr.RowState
    '' Case DataRowState.Added
    '' astep += 1
    '' ' =======================================================
    '' ' This "Try Catch" section created only if auto numbering
    '' ' is NOT turned on for the table being updated. SEF...
    '' ' It's a crude attempt at creating a unique number.
    '' ' A more serious approach would be to use a GUID.
    '' ' Use only if you decide not to have a sequence and a
    '' ' trigger for the table.
    '' ' =======================================================
    '' Try
    '' 'ds.Tables(tblIndex).Rows(rwIndex).Item(0) = astep
    '' Catch
    '' ' ignore the error corrected integer identity so don't randomize it
    '' End Try
    '' dr.Item("createdDate") = Now
    '' dr.Item("changedDate") = Now
    '' Case DataRowState.Modified
    '' dr.Item("changedDate") = Now
    '' End Select
    '' Catch ex As Exception
    '' conn.Close()
    '' conn.Dispose()
    '' Throw New ArgumentException(" Error: update_datasets " & ex.Message)
    '' End Try
    '' rwIndex += 1
    ''Next
    selectstmt = "SELECT * From " & dt.TableName & " Where " & dt.Columns(0).ColumnName & " = " & 0
    da = New OracleDataAdapter(selectstmt, m_conn)
    Dim bldr As OracleCommandBuilder = New OracleCommandBuilder(da)
    AddHandler da.RowUpdated, New Oracle.DataAccess.Client.OracleRowUpdatedEventHandler(AddressOf da_RowUpdated)
    Dim insCmd As OracleCommand = Nothing
    Try
    insCmd = CType(bldr.GetInsertCommand(), OracleCommand)
    Catch ex As Exception
    Throw New Exception("")
    End Try
    insCmd.CommandText += " returning " + dt.Columns(0).ColumnName + " into :seqno"
    insCmd.Parameters.Add(New OracleParameter("seqno", OracleDbType.Int16, _
    4, ParameterDirection.Output, False, CType(0, System.Byte), CType(0, _
    System.Byte), dt.Columns(0).ColumnName, DataRowVersion.Current, Nothing))
    da.InsertCommand = insCmd
    Try
    ' ===========================
    da.Update(ds, dt.TableName)
    ' ===========================
    Catch ex As Exception
    Throw New ArgumentException(" Error: update_datasets_return " & ex.Message)
    End Try
    Next
    m_conn.Close()
    m_conn.Dispose()
    Return ds
    End Function
    Friend Shared Sub da_RowUpdated(ByVal sender As Object, ByVal e As OracleRowUpdatedEventArgs)
    If e.StatementType = StatementType.Insert Then
    e.Row(0) = Int64.Parse(e.Command.Parameters("seqno").Value.ToString())
    End If
    End Sub
    ' ================================================================================
    ' Notes:
    ' =================== How To -- Sample section for PL/SQL ==================================
    ' myTrigger, myTable, mySequence, and myColumn are values you need to supply.
    ' Note: A trigger needs to be created for each table.
    ' A sequence needs to be created only once and referenced each time
    ' in the trigger(s). Or you could create a new sequence each time you
    ' create a trigger. Sort of a waste of effort.
    ' Explanation:
    ' myTrigger = The name you are giving this trigger.
    ' If a trigger with same name already
    ' exist, it will be overwritten.
    ' myTable = Table you want to add the sequence numbers to.
    ' mySequence = Sequence counter you created. Whatever name you called it.
    ' myColumn = The column to update with the sequence number.
    ' =================================================================================
    ' -- Run in PL/SQL or create at DB. --
    ' create or replace trigger myTrigger
    ' before insert on myTable for each row
    ' begin
    ' select mySequence.nextval into :new.myColumn from dual ;
    ' end;
    ' -- Run in PL/SQL or create at DB. --
    ' create sequence mySequence
    ' MINVALUE 1
    ' START WITH 1
    ' INCREMENT BY 1
    ' NOCACHE; can be set to CACHE but sequence may contain gaps.
    ' Explanation of CACHE from: http://www.techonthenet.com/oracle/sequences.php
    ' With respect to a sequence, the CACHE option specifies how many sequence
    ' values will be stored in memory for faster access. The downside of creating
    ' a sequence with a CACHE is that if a system failure occurs, all cached
    ' sequence values that have not be used, will be "lost". This results in
    ' a "gap" in the assigned sequence values. When the system comes back up,
    ' Oracle will CACHE new numbers from where it left off in the sequence,
    ' ignoring the so called "lost" sequence values.
    ' Note: To recover the lost sequence values, you can always execute an
    ' ALTER SEQUENCE command to reset the counter to the correct value.
    ' NOCACHE means that none of the sequence values are stored in memory.
    ' This option may sacrifice some performance, however, you should not encounter
    ' a gap in the assigned sequence values.
    End Class
    C#:
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    public class OracleUpdater2
    private static OracleConnection m_conn;
    private static OracleDataAdapter da = new OracleDataAdapter();
    private static OracleConnection conn = new OracleConnection();
    public static DataTable load_it(string constr, string strqry, string tblName)
    // =====================================================================
    // constr = User Id=myUser;Password=myPass";Data Source=myDataSource
    // strqry = Select * from something?
    // tblName = The table name to fill.
    // =====================================================================
    conn = new OracleConnection(constr);
    conn.Open();
    da = new OracleDataAdapter(strqry, conn);
    OracleCommandBuilder bldr = new OracleCommandBuilder(da);
    DataTable dt = new DataTable(tblName);
    da.Fill(dt);
    conn.Dispose();
    return dt;
    public static DataSet update_datasets_return(string constr, DataSet ds)
    //'ByRef ds As DataSet)
    string selectstmt = null;
    m_conn = new OracleConnection(constr);
    try
    m_conn.Open();
    catch (Exception ex)
    throw new ArgumentException(" Error: connection lost." + ex.Message);
    foreach (DataTable dt in ds.Tables)
    selectstmt = "SELECT * From " + dt.TableName + " Where " +
    dt.Columns[0].ColumnName + " = " + 0;
    da = new OracleDataAdapter(selectstmt, m_conn);
    OracleCommandBuilder bldr = new OracleCommandBuilder(da);
    da.RowUpdated += new
    Oracle.DataAccess.Client.OracleRowUpdatedEventHandler(da_RowUpdated);
    OracleCommand insCmd = null;
    try
    insCmd = (OracleCommand)(bldr.GetInsertCommand());
    catch (Exception ex)
    throw new Exception("" + ex.Message);
    insCmd.CommandText += " returning " + dt.Columns[0].ColumnName + " into
    :seqno";
    insCmd.Parameters.Add(new OracleParameter("seqno", OracleDbType.Int16, 4,
    ParameterDirection.Output, false, System.Convert.ToByte(0),
    System.Convert.ToByte(0), dt.Columns[0].ColumnName, DataRowVersion.Current,
    null));
    da.InsertCommand = insCmd;
    try
    // ===========================
    da.Update(ds, dt.TableName);
    // ===========================
    catch (Exception ex)
    throw new ArgumentException(" Error: update_datasets_return " +
    ex.Message);
    m_conn.Close();
    m_conn.Dispose();
    return ds;
    If you need a working program of how this works, let me know.

    Oh my god, it is too long! You definitely check out types, casting and especially ODP.Net (it does everything for you)... etc. They can help you to simplify your code. I do not have enough time to copy paste it to Studio and understand and solve your issue, so I got title of your message as your main question.
    In Oracle, you can create an autonumber field by using sequences object. This is really useful when you need to create a unique number to act as a primary key.
    Basically you can create a sequence simply typing;
    CREATE SEQUENCE MY_SEQUENCE;
    now you have a sequence called "MY_SEQUENCE"... Then, I advice you select a number from sequence;
    select MY_SEQUENCE.nextval from dual;
    I said I advice actually kinda must, although it called sequence, I cannot be sequential. Do not even try to predict the value. You can be sure that it is unique number so you can use it.
    Then insert you record and use that number part of your primary key. I think that's it. Have fun.

  • Update Fund & Fund center data in auto generated PR during MRP RUN

    Problem in the MRP auto generated PRs.
    The normal PRs created manually have all relevant fields of fund center viz CO area ,commitment item,Funds center, fund.
    But the problem is with respect to the Purchase Requisitions generated automatically during the MRP RUN.
    How to include the fund centers in MRP generated PRs automatically in the creation stage itself instead of going into change mode using ME52n Transaction code and change it to include fund centers one by one for each line item.
    We require this as we have hundreds of PRs generated every day.

    Hi,
    In order to fulfill this requirement, transaction FM_MRP_PR should be used.
    Please also take a look to FM_MRP_PR on-line documentation :
    The PRs generated from the MRP run are considered as planning documents
    and do not have any impact on the budget. To encumber these PRs in the
    corresponding settlement receivers, you have to execute this program for
    the relevant PRs.
    Best Regards,
    Arminda Jack

  • How do you remove or change auto generated text in returned form e-mails?

    Hello,
    I am currently using Adobe Acrobat 8 Professional (Version 8.1.3) to create a form that will be sent to a group of people.  When testing it, I've noticed that when the end user presses the "SUBMIT FORM" button and a new e-mail opens with the completed form attached, the following text is automatically added to the body of the e-mail:
    Form Returned: XXXXXXX.pdf
    Instructions to add this form to a data set:
    1. Double-click the attachment.
    2. Acrobat will prompt you to select a data set.
    What I need to know is whether or not there is a way to either prevent this auto generated text from appearing or revise it so it gives a custom message instead.
    Any insight would be greatly appreciated!
    Regards,
    Jeff

    It sounds like you are getting a basic message that is telling you submitting the PDF is unnecessary and asking if you want to submit the data instead. I have not seen this one before, but that is my guess. If you are using the form fields created in Acrobat (not Designer), then just select FDF or XML for the data type to be submitted, not the form.

  • How to Create a Auto Generated number with some preceding text in Sharepoint 2010

    I am trying to create a auto generated number field in Sharepoint 2010 list item. My requirement is to have the following format number generated when new request is created in Sharepoint using form. Auto generated Ticket ID should be in the following format
    "IR13000" "IR13001" "IR13002"....... Please let me know how to get this done. I tried to use combination of default ID and Characters but its not working for new requests, its only reflecting for existing uploaded requests. I
    am trying this for taking up Ticket requests by filling up some fields in the form. Any quick help is much appreciated.
    Thanx

    Here are the steps:
    1 - Open your SharePoint site in SP Designer 2010.
    2 - Click Workflows and add a List workflow. Associate this workflow on the list where you want the Random Text to be generated.
    3 - Inside the workflow editor, select the Action "Update list item"
    4 -  Select 'Current Item'.
    5 - Click Add.. and select the field which needs to be updated with the Random Text. Make sure this column is not of type "Calculated" type, otherwise you won't see it in the list of the fields within the workflow.
    6 - Click "..." button in the next textbox which will open String Builder dialog box.
    7 - Type IR and then click 'Add or Change Lookup and select ID column from "Field from source". Hit OK.
    8 - It should look like IR[%Current Item:ID%]
    9 - Hit OK.
    10 - Save and publish the workflow. (Please note that currently this workflow is not set to auto run on creating new items. That's because we want to test it at this point of time).
    11 - Go to your list in SharePoint and create a new item. After creating, select the item and click Workflows and then run this workflow.
    12 - You should be able to see the text "IR1" in the designated column.
    13 - Once you see that it's working, go to SPD and set the workflow to run automatically on creation of the new item. Save and publish and then return to your list in SharePoint.
    14 - Create a new item there and you should see the Random value in the column.
    15 - You will also see the column in the New form. In order to remove it, go to List settings > content types > Item content type > and select Hidden for this column so that it doesn't showup in any form.
    Try it and let me know how it goes.
    Thanks,
    Ashish

  • Auto-generated objects are not generated - CP2 and CP1

    Hi folks,
    Almost nothing that is dependent on the Event Handler works.
    When I "click" during recording, nothing is added to the new movie
    except the capture of the background ... no matter the
    recording mode used. When recording in Demo mode, text captions and
    highlights should be auto-generated, but are not. And when
    recording in either of the Assessment modes, clickboxes and other
    interactivity that should be auto-generated are not.
    Sudden onset - no prior trouble.
    Both Captivate 1 and 2 are loaded and the problem exists with
    both. Yet both were fine earlier (though I don't know when this
    happened, I just know it was discovered on both at the same time
    yesterday.)
    Any help is greatly appreciated.

    Hello toddfromheber,
    I'm sorry to hear you are having these issues with your passwords. If you are having issues with iCloud Keychain not sharing or autofilling your generated passwords, you may find the troubleshooting steps outlined in the following article helpful:
    Get help using iCloud Keychain - Apple Support
    Sincerely,
    - Brenden

  • SQL Dev Data Modeller:  Auto-generate Surrogate PKs in the Physical Model ?

    How can I have the logical modeller allow the user to design with logical PKs, but then have surrogate primary keys be auto-generated off sequences by the modeller when it comes to create the physical model - as in conventional application design?
    Without this facility, this tool is useless, IMO.
    I want:
    i). sequences to become the physical PKs by default, and that what were the logical PKs in the logical model, to become a unique key in the physical model.
    ii). I want this set by default when generating the physical model....
    iii). ....with an option to turn this off on a entity-by-entity basis (as not all tables will necessarily require such a surrogate PK; so the logical PK may remain the physical PK).

    It is common practice that physical PKs in Oracle tables are defined from sequences (surrogate PKs), and that the logical PK from the entity becomes a unique key in the table.
    This may not always be the case in every application out there, and some people may disagree, but it is nonetheless a needed feature.
    My new Feature Request is therefore:
    I would like to see the following additions to the product.
    1. In the Preferences -> Data Modeler -> Model -> Logical, a flag that by default indicates whether the designer wishes to opt to enable this feature (ie; have all logical PKs converted to unique keys, and replaced by sequence nos. in the physical model). This flags needs to be there since in real life, albeit erroneously IMO, some people will choose not to opt to use this functionality.
    2. On every entity created in the model, there needs to be a flag that allows to override this default option, as not every table will require a surrogate PK to be generated. Being able to (re)set a flag located on the entity properties (perhaps under 'Engineer To'), will accomplish this.
    3. When Forward Engineering to the physical model from the logical, the following should happen.
    ENTITY  1 ---------->TABLE 1
    ---------------------> P * Surrogate PK
    * Attribute 1 -----> U * Column 1
    * Attribute 2 -----> U * Column 2
    o Attribute 3 ----------> Column 3
    Here you can see,
    - Attributes 1 & 2 (the logical PK) of the entity become a unique key in the table (columns 1 & 2),
    - optional Attribute 3 becomes NULLable column 3,
    - and a physical surrogate PK column is added (type unbounded INTEGER, PRIMARY KEY constraint added).
    From entity DEPT as:   (Examples based on SCOTT schema)
    DEPTNO NUMBER(2) NOT NULL <-- Logical primary key on entity
    DNAME VARCHAR2(14)
    LOC VARCHAR2(13)
    CREATE TABLE DEPT
    (PK_DEPT INTEGER, -- New column becomes surrogate physical PK, driven from sequence defined later
    DEPTNO NUMBER(2) NOT NULL, -- Former logical PK becomes a UK
    DNAME VARCHAR2(14),
    LOC VARCHAR2(13))
    ALTER TABLE DEPT
    ADD CONSTRAINT PK_DEPT PRIMARY KEY (PK_DEPT) USING INDEX PCTFREE 0
    ALTER TABLE DEPT
    ADD CONSTRAINT UKLPK_DEPTNO UNIQUE (DEPTNO) USING INDEX PCTFREE 0 -- Former logical PK becomes a UK (constraint name reflects this)
    CREATE SEQUENCE PK_DEPT_SEQ
    CREATE TRIGGER PK_DEPT_SEQ_TRG
    BEFORE INSERT ON DEPT
    FOR EACH ROW
    WHEN (new.PK_DEPT IS NULL)
    BEGIN
    SELECT PK_DEPT_SEQ.NEXTVAL
    INTO :new.PK_DEPT
    FROM DUAL;
    -- Or from 11g onwards, simply,
    :new.PK_DEPT := PK_DEPT_SEQ.NEXTVAL;
    END;
    From entity EMP as:
    EMPNO NUMBER(4) NOT NULL -- Logical primary key on entity
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    CREATE TABLE EMP
    (PK_EMP INTEGER, -- New column becomes surrogate physical PK, driven from sequence defined later
    FK_DEPT INTEGER, -- New FK to surrogate PK in DEPT table (maybe NOT NULL depending on relationship with parent)
    EMPNO NUMBER(4) NOT NULL, -- Former logical PK becomes a UK
    ENAME VARCHAR2(10),
    JOB VARCHAR2(9),
    MGR NUMBER(4),
    HIREDATE DATE,
    SAL NUMBER(7,2),
    COMM NUMBER(7,2),
    DEPTNO NUMBER(2))
    ALTER TABLE EMP
    ADD CONSTRAINT PK_EMP PRIMARY KEY (PK_EMP) USING INDEX PCTFREE 0
    ALTER TABLE EMP
    ADD CONSTRAINT FK_DEPT FOREIGN KEY (FK_DEPT) REFERENCES DEPT (PK_DEPT)
    ALTER TABLE EMP
    ADD CONSTRAINT UKLPK_EMPNO UNIQUE (EMPNO) USING INDEX PCTFREE 0 -- Former logical PK becomes a UK (constraint name reflects this)
    CREATE SEQUENCE PK_EMP_SEQ
    CREATE TRIGGER PK_EMP_SEQ_TRG
    BEFORE INSERT ON EMP
    FOR EACH ROW
    WHEN (new.PK_EMP IS NULL)
    BEGIN
    SELECT PK_EMP_SEQ.NEXTVAL
    INTO :new.PK_EMP
    FROM DUAL;
    -- Or from 11g onwards, simply,
    :new.PK_EMP := PK_EMP_SEQ.NEXTVAL;
    END;
    [NOTE:   I use PCTFREE 0 to define the index attributes for the primary & unique keys since the assumption is that they will in general not get updated, thereby allowing for the denser packing of entries in the indexes and the (albeit minor) advantages that go with it.
    This is certainly always true of a sequence-driven primary key (as it is by its very nature immutable), but if the unique key is likely to be frequently updated, then this PCTFREE option could be user-configurable on a per table basis (perhaps under Table Properties -> unique Constraints).
    For non-sequence-driven primary keys, this storage option could also appear under Table Properties -> Primary Key.
    I notice no storage options exist in general for objects, so you may like to consider adding this functionality overall].
    Associated Issues :
    - Preferences, 'Naming Standard: Templates' should be updated to allow for the unique key/constraint to be called something different, thus highlighting that it comes from the logical PK. I've used 'UKLPK' in this example.
    - Mark the physical PK as being generated from a sequence; perhaps a flag under Table Properties -> Primary Key.
    - When Forward Engineering, if an entity exists without a logical PK, the forward engineering process should halt with a fatal error.
    !!! MODERATOR PLEASE DELETE ME !!!

  • Auto-Generate Task Form in Jdeveloper 11.1.1.4.0

    Greetings!
    I am studying SOA Suite from some books like "WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g" and "Getting Started with Oracle SOA Suite 11g R1 – A Hands-On Tutorial". These books say that in order to generate a task form using a human task in Bpel you have to right click the human task and should appear a menu option called "Auto-generate Task Form" however this option doesn't show up in my Jdeveloper. Anybody kwnows why?
    I am using Jdeveloper 11.1.1.4 with SOA Composite Editor     11.1.1.4.0.56.82.
    My platform is Windows 7 Professional 64 bits.
    Any help would be appreciated
    Thanks!
    Ramiro Ortiz

    Hi Ramiro
    In JDeveloper, on left side, in Application Navigator tab, select and double clikck your .task file. On right side, in the central window, you will see that Task Details in different tabs. Like on right side, you will see General, Data like. On right side, at the TOP of the central window, there will be a drop down box. Just click on that drop down box, you should see an option like Create or Generate Form something like that. You select that, and it will open a dialog to select a new Project. There give a new Project Name instead of selecting the existing project. Enter the new project name and it will generate the taskDetails.jsp with all other files in that new project.
    If you do not see this option to auto generate form, in the central window. Since you already created human task, I am assuming you updated your JDeveloper with 2 Plugins from help -> Update menu like for SOA Composite Editor and BPM Editor (BPM Only if you want BPM specific stuff).
    Thanks
    Ravi Jegga

  • Problem in using Auto-generated Table in Program

    Hi experts,
    I'm using some auto-generated table in my program. But the Problem is program is not activated due to non-existance of any type of table or structure or view of that Table type in the development server. i.e. table name in development is FMFMOADE12200014 and same in Production is FMFMOAPE14000018.
    How can I solve this problem to active the program and transport it?
    Thnaks in advance.
    Goutam

    Hi Friend  ,
    If  an Auto-generated tables  inside your program ,then you should not use that table directly  as internal table type .
    In that case you have used the Dynamic structure  in your program .
    tips is  you should check first the table is there in the  database  through your  programing using the standard function module for checking the table exsisting , then use the field symbols  for dynmaic creating of program  strucuture  ,including field creation  to tat strcuture  . this  will  make your  program more  lines in that  case you can  write  subroutine  for  creating the  fields  and adding  inside the dynamice strucure  .
    simple example  please see this link  :  [http://www.sap-img.com/ab030.htm]
    becasuse  we do have the  same  auto-generating table  concept  in Finance  base  on the Operating cencern  out table  name  & fields  inside  will be changing  ,Our  program has to support world wide Rollouts . so we used  dynamic structuring  inside Our program .
    Regards,

  • Mail 4.4 Reply Forward Icon Not Displaying for Auto-generated emails

    Does anyone have a problem with Mail 4.4...
    For auto generated emails (system generated or confirmation emails), when forwarded these email, little icon on the left that pops up, its just simply not showing up...???!!!
    And for the all other emails it works like it should...
    Anyone? Solution? Help?

    I finally figured out how to make this work for 2 accounts on exchange.  I created my main account and then adding another account  that I'm delegated for within the account.  I also tried my main account and adding IMAP account with still no luck.  What I ended up doing was adding two separate exchange accounts and named them appropriately.  This solved the problem of sent messages going to the proper sent items folder and arrows appearing for Reply and Forward email responses on all machines.  Works like a charm

Maybe you are looking for