|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Thank you for the tip. That's something interesting to change the sql _expression_ on the fly. I was looking for that too.
But you don't get me so I gonna try to be explain with more concise explanations.
The algorithm is the following:
1 - get data from the DA, check data and return a result (basically 2 results : data accepted or not)
2 - if result = data_accepted, I insert new data using raw sql
3 - write into a log entity (in any circumstances) using EOF aka create an object and insert it into an ec.
What I tried to explain is that when the EOUtilities.rawRowsForSQL is executed in step 2 (and it works, I don't have any issue here), the step 3 fails because he can't get a primary key. If the step 2 is not executed, the step 3 is executed successfully.
I put the simple code below that is executed, just in case but nothing weird I guess (I removed the try/catch).
String aIpAdress = (String) userInfo.get(NotificationUserInfoEnum.IP_ADDRESS.toString());
String aRequest = notificationData.getSenderUri();
String aStatus = (String) userInfo.get(NotificationUserInfoEnum.STATUS.toString());
EOEditingContext ec = ERXEC.newEditingContext();
NOApplication anApplication = null;
if (notificationData.getApplicationName() != null)
anApplication = NBCacheManager.getInstance().application(ec, notificationData.getApplicationName(), notificationData.getPlatform());
NONotificationRequestLog notificationLog = NONotificationRequestLog.createAndInsertNONotificationRequestLog(ec);
else if (notificationData.getApplicationName() != null)
//If a notification is received, we don't know the platform
if (!(this instanceof NBNotificationReceivedRecorder))
On 5 sept. 2011, at 01:08, Ray Kiddy wrote:
_______________________________________________ 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
|>Feedback about issue with MySQL and get primary key (From: Philippe Rabier <email@hidden>)|
|>Re: Feedback about issue with MySQL and get primary key (From: Ray Kiddy <email@hidden>)|
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.