Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
A Many-To-Many Problem
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
A Many-To-Many Problem
Subject
:
A Many-To-Many Problem
From: "Jonathan Fleming" <
email@hidden
>
Date: Thu, 02 Jan 2003 12:31:03 +0000
Hi guys,
I have a real dilema on my hands, I have tried so many times in vain to get a many-to-may selection to maintain the selection in the WOBrowser or even a WOToManyRel.
What is happening is this:
TbJobPicture (an EOModel Entity) has a toMany relationship with TbCategory (an EOModel Entity) and vise-versa.
TbJobPicture is connected to TbCategory with a flattened relationship named f_tbCategorys
TbCategory is connected to TbJobPicture with a flattened relationship named f_tbPictures
The Join table simply has two primary keys as attributes/properties and is called TbPicCatJoin.
Imagine I have run a clean application with no database rows in at all and I manage to create a picture with it's details through a form to save to my TbJobPicture table/entity and then I categorise the image with 3 categories of my 10 category selection in my WOBrowser or WOToManyRel (I've tested with both) which will save in my TbCategory table/entity.
I save my work, I check the database and all the tables including the Join table have been updated correctly and are looking fine. I then rebuild the application to check that all is well and presto! the 3 categories I chose in my list are still highlited in the WOBrowser or WOToManyRel (either way that I test it). Remember this is just one object or one database row all be it through 3 tables.
Now, here's where the trouble starts (with two or more objects/database rows). I repeat the process, create a picture with it's details through a form, categorise it by selecting many categories, save it in the application and it looks fine, the correct fields are highlighted and all the database tables look correctly configured. I can even skip around the rest of the direct action side of the site and come back to the session admin side to see if my pictures and their selections are still there and that is fine too.
But, as soon as I rebuild and go back to any of the images I find that every category in the WOBrowser or WOToManyRel (whichever one I test) is highlighted but not reflected in the database (the original selection are still true in the database - or so it appears), however when I try to delete or correct the selection upon a save I get this error:
Error: com.webobjects.eoaccess.EOGeneralAdaptorException
Reason: deleteRowDescribedByQualifierEntity -- com.webobjects.jdbcadaptor.JDBCChannel: method failed to delete row in database
but these rows don't exsist and I don't know how to get out of this error or correct it without dropping the 3 stated tables and starting over from scratch which I have done too many times now and that's why I am asking for your help.
Has anyone ever come across this horrendous problem and managed to correct it, because I would love to know the answer and would be so greatful to finally get my app on the server.
Kind regards Jonathan
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
Prev by Date:
String conversion with HTML entities
Next by Date:
Re: SQL and ASP In WebObjects
Previous by thread:
Re: String conversion with HTML entities
Next by thread:
Which Mac for a Windows Guru?
Index(es):
Date
Thread