Ok Xavier, I go to delete my many-2-many relationship and recreate it. Envoyé de mon iPad
Le 5 avr. 2013 à 17:43, Dev WO <webobje...@anazys.com> a écrit : > I may be wrong but I think you shouldn't have the relationship you have in > your join table. > You should have only 2 in this table: > -a to-one to EOMatiere > -a to-one to EODomaine > > your join-table doesn't really look like a join-table with all these > relationships. > > I would manually recreate every relationship > > Xavier > > On 5 avr. 2013, at 17:33, Raymond NANEON <rnan...@me.com> wrote: > >> Hi Xavier, >> >> I used reverse engineering to create entities and relationship between them >> have been created automatically. I don't think using wizard will change >> something. Why recreate relationship? >> Thanks >> >> Envoyé de mon iPad >> >> Le 5 avr. 2013 à 16:31, Dev WO <webobje...@anazys.com> a écrit : >> >>> Hi Raymond, >>> >>> Your many-to-many model looks strange to me. >>> You shouldn't have the relationship listed in repartDomMatieres like that. >>> Try recreate your many-to-many using EOmodeler "create relationship" wizard. >>> >>> Xavier >>> >>> On 5 avr. 2013, at 15:55, Raymond NANEON <rnan...@me.com> wrote: >>> >>>> Hi List, >>>> >>>> I have a table "EORepartDomMatiere" which has like pk foreign key of 2 >>>> others tables (EODomaine & EOMatiere). >>>> <mat1.jpg> >>>> <reparMat1.jpg> >>>> <dom1.jpg> >>>> <reparDom1.jpg> >>>> So when I want to save in the many-to-many table whith ec.saveChanges(); >>>> >>>> ... >>>> repart.setMatiereRelationship(mat); >>>> repart.setDomaineRelationship(dom); >>>> if (ec.hasChanges()) >>>> ec.saveChanges(); >>>> ... >>>> >>>> I got this Exception : java.lang.IllegalStateException: Adaptor >>>> er.extensions.jdbc.ERXJDBCAdaptor@3e2ad6a0 failed to provide new primary >>>> keys for entity 'EORepartDomMatiere' >>>> at >>>> com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoordinator(EODatabaseContext.java:5713) >>>> at >>>> com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:370) >>>> at >>>> com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192) >>>> at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:1176) >>>> at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1099) >>>> at >>>> org.utt.rfcct.serveur.components.assistants.modules.ModuleAdminDomaine.rePartDomMat(ModuleAdminDomaine.java:349) >>>> at >>>> org.utt.rfcct.serveur.components.assistants.modules.ModuleAdminDomaine.uneMatiereEnregistrer(ModuleAdminDomaine.java:314) >>>> >>>> Why the adaptor want to create a new primary key? What's wrong? >>>> >>>> Thanks for your help >>>> Envoyé depuis iCloud >>>> _______________________________________________ >>>> Do not post admin requests to the list. They will be ignored. >>>> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) >>>> Help/Unsubscribe/Update your Subscription: >>>> https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40anazys.com >>>> >>>> This email sent to webobje...@anazys.com >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com