0

the command show create table myTable shows the foreign keys but without the parent table. Is there a way to also view the parent tables?

What I get is this:

KEY `FK_friend_id` (`friend_id`)

What I want to see is this (or something that shows customer):

CONSTRAINT `fk_friend_id` FOREIGN KEY (friend_id) REFERENCES customer (id) ON DELETE RESTRICT ON UPDATE CASCADE
kasavbere
  • 5,873
  • 14
  • 49
  • 72

1 Answers1

1

From my understanding i could say that ,

Foreign Key have not created for it,

For Creating Foreign key Constraint ,Use Innodb Engine ,bcz if you have used MYISAM Engine it may fail to create the Foreign Keys , just we could see the primary keys alone as you mentioned

Correct me if 'm wrong ,

thar45
  • 3,518
  • 4
  • 31
  • 48
  • The tables are created by hibernate. And you are right, it's using `MyISAM`. Many thanks (up vote). Only problem, I am new to hibernate and don't know how to set the engine. – kasavbere Oct 08 '12 at 05:28
  • Thats fine ..Welcome @Kasavbere – thar45 Oct 08 '12 at 05:30