Hello;

I am running trying to build code based on existing tables. 

One tables has several foreign keys referencing it.

It looks like this is being detected, but nothing is being done about it:

[middlegen] (middlegen.MiddlegenPopulator        359 ) Found a relation
between country and participant. Skipping it since participant isn't among
the specified tables.
[middlegen] (middlegen.MiddlegenPopulator        359 ) Found a relation
between country and patient. Skipping it since patient isn't among the
specified tables.
[middlegen] (middlegen.MiddlegenPopulator        225 ) WARNING: Middlegen
couldn't find any relations between any tables. This may be intentional from
the design of the database, but it may also be because you have incorrectly
defined the relationships. It could also be because the JDBC driver you're
using doesn't correctly implement DatabaseMetaData. See the samples (for an
example on how to define relationships) and verify that your driver
correctly implements DatabaseMetaData.
[middlegen] (middlegen.Middlegen                 393 ) Validating hibernate
[middlegen] (middlegen.Middlegen                 410 ) Invoking plugin
hibernate

How can I specify the referring tables? Also when I run appgen on the
patient and participant table it doesn't detect the relelationship at all?

Any tips?

Here is the DDL:

create table country (
        countryId bigint not null AUTO_INCREMENT,
        name varchar(100),
        constraint pk_country primary key (countryId)
)
engine = InnoDB;


create table participant (
    participantId bigint not null AUTO_INCREMENT,
    firstName varchar(50),
    countryId bigint not null,
    constraint pk_participant primary key (participantId)
)
engine = INNODB;


create table patient (
        countryId bigint not null,
        patientId bigint not null AUTO_INCREMENT,
        patientName varchar(50), 
        constraint pk_patient primary key (patientId)
)
engine = INNODB;

alter table patient add index IDpatient (patientId), add constraint
FKpatient foreign key (countryId) references country (countryId);
alter table participant add index IDparticipant (participantId), add
constraint FKparticipant foreign key (countryId) references country
(countryId);

-- 
View this message in context: 
http://www.nabble.com/Appgen-Relationships-tf3550225s2369.html#a9911448
Sent from the AppFuse - User mailing list archive at Nabble.com.

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

Reply via email to