Re: updating...

From: Emanuele Maiarelli (evvdra..ahoo.it)
Date: Wed Jul 22 2009 - 06:17:34 EDT

  • Next message: Reinout van Schouwen: "Different DataContext"

    this.datacontext.commitChanges(); is correct I fear u didn't create the object that you are populating, into datacontext. Check ur this.getPerfil(objid), the object that you are updating must be created into context or by a query SelectQuery q=new SelectQuery(this.queryClass); List data = ctx.performQuery(q); where data is a List of queryClass objects, or if u want create a new object Object o=ctx.newObject(this.queryClass); In any case youcan check what is present into ur context: ctx.modifiedObjects(); will return a Collection of objects that you modified ctx.newObjects(); will return a Collection of objects that you created ________________________________ Da: Juan Toro Marty <juan4eve..mail.com> A: user@cayenne.apache.org Inviato: Mercoledì 22 luglio 2009, 12:01:12 Oggetto: updating... Can anybody helpme teachme any way to make an update... i am using the following way: Perfiles perfil = this.getPerfil(objid);//with this i retrieve an object Perfil. then... perfil.setName = name; perfil.setAge = age; ....etc... this.datacontext.commitChanges(); but nothing happens... is this the right way to do an update? it seems to me... but i have to say here are the 6am in the morning and i only want to go to the bed... x_X please advice me.... thanks. btw: sorry about my english...



    This archive was generated by hypermail 2.0.0 : Wed Jul 22 2009 - 06:18:11 EDT