Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

How do I have to setup an EntityBean if a foreign key is referenced by a CASCADE ?
Assume I defined (at least) two SQL tables. The first table contains a forei
gn key of the second.
The primary key of the second table is defined similar to

CREATE TABLE .....
ADD FOREIGN KEY(customer_id) REFERENCES customer (customer_id) ON DELETE CAS
CADE;

Pay attention to the "DELETE CASCADE". Thus if I delete a record of the seco
nd table
automatically the referenced record in the first table is deleted as well.

Ok, now I define for each of the tables (resp. possible records) an EntityBe
an.

What do I have to change in the setup/coding of each of the two EntityBeans 
in order
to treat the foreign key REFERENCE correctly?

Do I really have to do nothing more?

That would mean an EntityBean would recognize the reference by itself withou
t help.
I cannot believe that.

Does someone have an experience with that scenario?

Arnold


Report this thread to moderator Post Follow-up to this message
Old Post
Arnold Peters
10-06-04 01:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Beans archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:53 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.