wood burning stoves*
The moose likes Object Relational Mapping and the fly likes Hibernate - impact of missing foreign key in database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate - impact of missing foreign key in database" Watch "Hibernate - impact of missing foreign key in database" New topic
Author

Hibernate - impact of missing foreign key in database

Mahesh Gadgil
Greenhorn

Joined: Jun 16, 2011
Posts: 2
If you have one to many mapping in your hibernate mapping file but do not have corresponding foreign key mapping on the tables in the database, then what is the impact to a Hibernate application?
Are constraints on the database optional?

Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8803
    
    5
Hi Mahesh,

Let's move this question over to a more appropriate forum.

Welcome to the ranch,

Bert


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Bogdan Baraila
Ranch Hand

Joined: May 23, 2011
Posts: 43
From hibernate point of view yes the constraints are optional (i mean that hibernate will work without the constraint).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate - impact of missing foreign key in database
 
Similar Threads
hibernate table mapping
Inheritance/one table for each class
composite primary keys
issue that should be really simple
Hibernate problem - creating duplicate foreign key index