InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: Problem with updates and foreign keys (Beta 2)


James

Fix for this will be in the next release. Hopefully coming in the next few
days.

Regards

Pete

--

Peter Hearty                         peter.hearty@lutris.com
Lutris Technologies (UK)        http://www.lutris.com
----- Original Message -----
From: "James Medlock" <jmedlock@tenornetworks.com>
To: <instantDB@enhydra.org>
Sent: Wednesday, September 20, 2000 5:23 PM
Subject: RE: InstantDB: Problem with updates and foreign keys (Beta 2)


> Is this something that can be fixed in the next beta as this problem makes
> FK's pretty much unusable?
>
> Thanks
> James
>
> -----Original Message-----
> From: owner-instantDB@enhydra.org [mailto:owner-instantDB@enhydra.org]On
> Behalf Of Peter Hearty
> Sent: Tuesday, September 19, 2000 1:49 PM
> To: instantDB@enhydra.org
> Subject: Re: InstantDB: Problem with updates and foreign keys (Beta 2)
>
>
> James
>
> Looks like a bug. InstantDB implements updates by doing a delete followed
by
> an insert. It's probably failing on the delete part because it hasn't
> checked that the subsequent insert has a valid value that will restore the
> referential integrity.
>
> Regards
>
> Pete
>
> --
>
> Peter Hearty                         peter.hearty@lutris.com
> Lutris Technologies (UK)        http://www.lutris.com
> ----- Original Message -----
> From: "James Medlock" <jmedlock@tenornetworks.com>
> To: <instantdb@enhydra.org>
> Sent: Tuesday, September 19, 2000 6:15 PM
> Subject: InstantDB: Problem with updates and foreign keys (Beta 2)
>
>
> > When I try and do an update of a row in a table for which there is a
> foreign
> > key reference, I get an exception stating that "Cannot delete value,
XXX.
> In
> > use by column A.B".
> >
> > Am I doing something wrong, or can Foreign Keys not be used in tables
that
> > are being updated?
> >
> > Thanks
> > James
> >
> > --
> >
> > Example:
> >
> > ; First load the JDBC driver and open a database.
> > d org.enhydra.instantdb.jdbc.idbDriver;
> > o jdbc:idb=blah.prp;
> >
> > ; Record all results
> > e SET EXPORT "export0.txt" FIXEDLENGTH COLNAMEHEADER ROWNUMBERS
CONTROLCOL
> > SUMMARYHEADER;
> >
> > e create table BAR (
> >   ID int,
> >   NAME CHAR(32)
> > );
> >
> > e create table FOO (
> >   ID int foreign key references BAR(ID) on delete cascade,
> >   NAME char(32)
> > );
> >
> > e insert into BAR(ID, NAME) values(101, "fred");
> > e insert into BAR(ID, NAME) values(102, "joe");
> >
> > e insert into FOO(ID, NAME) values(101, "fred2");
> > e insert into FOO(ID, NAME) values(102, "joe2");
> >
> > ; This fails with "Cannot delete..." exception
> > e update BAR set NAME="newfred" where ID=101;
> >
> > ; The End
> > c close;
> >
>
> --------------------------------------------------------------------------
> ---
> > To unsubscribe from this mailing list, send email to
majordomo@enhydra.org
> > with the text "unsubscribe instantdb" in the body of the email.
> > If you have other questions regarding this mailing list, send email to
> > the list admin at owner-instantdb@enhydra.org.
> >
>
> --------------------------------------------------------------------------
--
> -
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>
> --------------------------------------------------------------------------
---
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>

-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.