Here is my schema:
#
-----------------------------------------------------------------------
# RDF
#
-----------------------------------------------------------------------
drop table if exists RDF;

CREATE TABLE RDF
(
    RDF_ID INTEGER NOT NULL AUTO_INCREMENT,
    TITLE VARCHAR (255),
    BODY VARCHAR (255),
    URL VARCHAR (255),
    AUTHOR VARCHAR (255),
    DEPT VARCHAR (255),
    PRIMARY KEY(RDF_ID)
);

#
-----------------------------------------------------------------------
# event
#
-----------------------------------------------------------------------
drop table if exists event;

CREATE TABLE event
(
    evnt_id INTEGER NOT NULL AUTO_INCREMENT,
    evnt_wrkq_id INTEGER (255),
    evnt_evty_id INTEGER (255),
    evnt_loan_id INTEGER (255),
    evnt_wkfl_id INTEGER (255),
    PRIMARY KEY(evnt_id)
);

#
-----------------------------------------------------------------------
# event_type
#
-----------------------------------------------------------------------
drop table if exists event_type;

CREATE TABLE event_type
(
    evty_id INTEGER NOT NULL,
    evty_desc VARCHAR (255),
    PRIMARY KEY(evty_id)
);

#
-----------------------------------------------------------------------
# workflow
#
-----------------------------------------------------------------------
drop table if exists workflow;

CREATE TABLE workflow
(
    wkfl_id INTEGER NOT NULL,
    wkfl_status INTEGER (255),
    wkfl_wftp_id INTEGER (255),
    wkfl_loan_id INTEGER (255),
    wkfl_evnt_id INTEGER (255),
    PRIMARY KEY(wkfl_id)
);

#
-----------------------------------------------------------------------
# workque
#
-----------------------------------------------------------------------
drop table if exists workque;

CREATE TABLE workque
(
    wrkq_id INTEGER NOT NULL,
    wrkq_wkgp_id INTEGER (255),
    wrkq_wrkr_id INTEGER (255),
    PRIMARY KEY(wrkq_id)
);

#
-----------------------------------------------------------------------
# worker
#
-----------------------------------------------------------------------
drop table if exists worker;

CREATE TABLE worker
(
    wrkr_id INTEGER NOT NULL,
    wrkr_desc VARCHAR (255),
    PRIMARY KEY(wrkr_id)
);

#
-----------------------------------------------------------------------
# workgroup
#
-----------------------------------------------------------------------
drop table if exists workgroup;

CREATE TABLE workgroup
(
    wkgp_id INTEGER NOT NULL,
    wkgp_desc VARCHAR (255),
    PRIMARY KEY(wkgp_id)
);

#
-----------------------------------------------------------------------
# task
#
-----------------------------------------------------------------------
drop table if exists task;

CREATE TABLE task
(
    task_id INTEGER NOT NULL,
    task_tktp_id INTEGER (255),
    task_wrkq_id INTEGER (255),
    task_wkfl_id INTEGER (255),
    task_evnt_id INTEGER (255),
    task_status VARCHAR (255),
    PRIMARY KEY(task_id)
);

#
-----------------------------------------------------------------------
# task_type
#
-----------------------------------------------------------------------
drop table if exists task_type;

CREATE TABLE task_type
(
    tktp_id INTEGER NOT NULL,
    tktp_desc VARCHAR (255),
    tktp_wkgp_id INTEGER (255),
    tktp_wftp_id INTEGER (255),
    PRIMARY KEY(tktp_id)
);

#
-----------------------------------------------------------------------
# workflow_type
#
-----------------------------------------------------------------------
drop table if exists workflow_type;

CREATE TABLE workflow_type
(
    wftp_id INTEGER NOT NULL,
    wftp_desc VARCHAR (255),
    PRIMARY KEY(wftp_id)
);

#
-----------------------------------------------------------------------
# loan
#
-----------------------------------------------------------------------
drop table if exists loan;

CREATE TABLE loan
(
    loan_id INTEGER NOT NULL,
    loan_lntp_id INTEGER (255),
    loan_evnt_id INTEGER (255),
    PRIMARY KEY(loan_id)
);

#
-----------------------------------------------------------------------
# loan_type
#
-----------------------------------------------------------------------
drop table if exists loan_type;

CREATE TABLE loan_type
(
    lntp_id INTEGER NOT NULL,
    lntp_desc VARCHAR (255),
    PRIMARY KEY(lntp_id)
);

-----Original Message-----
From: Scott Eade [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2003 3:53 PM
To: Turbine Users List
Subject: Re: problem doing inserts using Criteria and Peer

Then I suggest that your schema is incorrect in that it is not
configuring the id method correctly. Please post your schema
so that we can comment on this.

Scott

brian wrote:

>I tried that method already and it just returns null because the
eventID
>on the Event object isn't set when the other information is saved.
>
>Brian 
>
>-----Original Message-----
>From: Scott Eade [mailto:[EMAIL PROTECTED] 
>Sent: Friday, September 19, 2003 12:16 AM
>To: Turbine Users List
>Subject: Re: problem doing inserts using Criteria and Peer
>
>brian wrote:
>
>  
>
>>I looked but I didn't see a method for retrieving the auto generated
>>value from an insert statement. Is there a way to do this when the
data
>>is saved this way?
>>    
>>
>Try:
>
>Event event = new Event();
>event.save();
>int eventId = event.getEventId();
>
>
>Scott
>  
>
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to