• 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
Re: JodaDateTime and mySQL update.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JodaDateTime and mySQL update.


  • Subject: Re: JodaDateTime and mySQL update.
  • From: James Cicenia <email@hidden>
  • Date: Wed, 19 Jun 2013 09:59:44 -0500

Red herring... something else going on.

I have a rest direction action and do the following in the action:

EOEditingContext ec = ERXEC.newEditingContext();


Device device = getDevice(ec,hwid,ppAppKey);


device.setLastReportedLongitude(new Double(json.get("lng").toString().replace("\"", "")));

device.setLastReportedLatitude(new Double(json.get("lat").toString().replace("\"", "")));

device.setDateModified(new DateTime());// I can remove this and it still fails.

ec.saveChanges();

Thoughts?



On Wed, Jun 19, 2013 at 9:02 AM, James Cicenia <email@hidden> wrote:
I am getting an error:
Caused by: com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier -- er.extensions.jdbc.ERXJDBCAdaptor$Channel method failed to update row in database


Here is the SQL being generated:

UPDATE Device SET lastReportedLatitude = ?, lastReportedLongitude = ?, dateModified = ? WHERE (id = ? AND badge is NULL AND hwid = ? AND lastReportedLatitude = ? AND lastReportedLongitude = ? AND osGatewayID = ? AND ppAppKey = ? AND token = ? AND zoneID is NULL)" withBindings: 1:41.85897038322115(lastReportedLatitude), 2:-87.66461452477394(lastReportedLongitude), 3:2013-06-19T08:52:51.734-05:00(dateModified), 4:2(id), 5:"6C219B57-8184-4537-85CE-B4A33F78F91E"(hwid), 6:41.8588996399584(lastReportedLatitude), 7:-87.6646017842811(lastReportedLongitude), 8:0(osGatewayID), 9:"679DB-17774"(ppAppKey), 10:"63080abb26010101ee4c...34a91d9a62bdaf20440a"(token)>

Here is it converted to run :

This Fails:

UPDATE Device SET lastReportedLatitude = 41.85897038322115, lastReportedLongitude = -87.66461452477394, dateModified = 2013-06-19T08:52:51.734-05:00 WHERE (id = 2 AND badge is NULL AND hwid = "6C219B57-8184-4537-85CE-B4A33F78F91E" AND lastReportedLatitude = 41.8588996399584 AND lastReportedLongitude = -87.6646017842811 AND osGatewayID = 0 AND ppAppKey = "679DB-17774" AND token = "63080abb26010101ee4c...34a91d9a62bdaf20440a" AND zoneID is NULL);

However if I put quotes around dateModified it does update.

Am I  missing a setting?
 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: JodaDateTime and mySQL update.
      • From: James Cicenia <email@hidden>
References: 
 >JodaDateTime and mySQL update. (From: James Cicenia <email@hidden>)

  • Prev by Date: Rép : JodaDateTime and mySQL update.
  • Next by Date: Re: problem direcAction and Birt
  • Previous by thread: Rép : JodaDateTime and mySQL update.
  • Next by thread: Re: JodaDateTime and mySQL update.
  • Index(es):
    • Date
    • Thread