EOModel Many-To-Many Not Sychronising In myApplication
EOModel Many-To-Many Not Sychronising In myApplication
- Subject: EOModel Many-To-Many Not Sychronising In myApplication
- From: "Jonathan Fleming" <email@hidden>
- Date: Mon, 06 Jan 2003 15:16:03 +0000
Hi guys,
I have a real dilema on my hands, I have tried in vain
to get a many-to-many selection to maintain the same selection in a
WOBrowser or even a WOToManyRel.
What is happening is this:
TbJobPicture (an EOModel Entity, saved as a java custom class) has a toMany
relationship with
TbCategory (an EOModel Entity, saved as a java custom class) 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 chosen categories of the total 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 I can see that 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/entities.
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 constructed application and it looks fine, the
correct fields are highlighted and all the database tables look correctly
configured. I can even skip around the directAction side of the site and
come back to the session admin side to
see if all the pictures and their selections are still highlighted correctly
and that looks fine too.
But, as soon as I rebuild and go back to any of the images I find
that every category (all 10 in our case) 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.
Although I get this error, if I try to correct the problem I can still
continue to add objects (tbJob & tbJobPictures) and try to synchronise the
many-to-many objects (tbCategory & tbJobPictures) and I just get a repeat of
what I have explined above.
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 be finally able to get my app on the server.
Kind regards
Jonathan
This post might not have got through to the list as I have posted this
before but had no response.
_________________________________________________________________
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.