ordering inserts of rows into single table

From: Damir Bijuklic (damirbijukli..ahoo.com)
Date: Tue Sep 06 2005 - 17:58:40 EDT

  • Next message: Gili: "Re: SelectQuery with object parameter"

    Hi,

    I have one somewhat silly problem...

    There are two tables with master/detail relationship.
    I insert one record to master and multiple records to
    detail. The system assigns detail numbers (not keys)
    in sequential order inside database triggers, so i
    invalidate inserted objects in order to fetch new
    values.

    The problem is that i need to insert detail records in
    specific order so they will be in a sequence.
    Unfortunaly, cayenne inserts records in opposite
    sequence of insertions to the detail collection in
    master object.

    I don't think i can avoid database creating sequence
    numbers, because it is needed from outside java, so it
    should not be done in application...

    Is there a simple solution or should i just
    use-the-source to do this?

    Damir

            
                    
    ______________________________________________________
    Click here to donate to the Hurricane Katrina relief effort.
    http://store.yahoo.com/redcross-donate3/



    This archive was generated by hypermail 2.0.0 : Tue Sep 06 2005 - 17:58:41 EDT