Re: Modeling an optional to-one relationship
Hi Chuck! On 14/Jan/2010, at 1:46 PM, Chuck Hill wrote: On Jan 14, 2010, at 3:36 AM, Mark Ritchie wrote: Yes, I believe that's the intended behaviour... The DatabaseContext tracks that newly created EO and throws an exception if you attempt to modify and then save it. Almost, it throws when the fault is fired. Hrm, in test case that I constructed, that's not what I observe. I'm using WOF 5.4.3, Java 1.5 on my development machine. Using the Movies EOModel and local mysql: I fetch a Talent EO. I ask for it's photo and get back a fault for the TalentPhoto EO (as expected.) I fire the fault and get back a TalentPhoto EO with PK set and nil values. EODatabaseContext.objectsWithMissingGlobalIds() confirms that it's tracking the TalentPhoto EO for me. I make a change to the Talent EO and save it. All is good. I make changes to TalentPhoto:set a photo and set it's talent relationship to the Talent EO. Then when I try to save changes, EOF tosses a EOObjectNotAvailableException with this explanation: prepareForSaveWithCoordinator: Cannot save the object with globalID _EOIntegralKeyGlobalID[TalentPhoto (java.lang.Integer)1]. The row referenced by this globalID was missing from the database at the time a fetch was attempted. Either it was removed from the database after this application got a pointer to it, or there is a referential integrity problem with your database. To be notified when fetches fail, implement a delegate on EODatabaseContext that responds to databaseContextFailedToFetchObject(). That explanation seems to match what I've done and the behaviour seems to match the documentation for EODatabaseContext's delegate databaseContextFailedToFetchObject(). http://tr.im/dcdelegate What am I doing differently then you? M. ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO Long Response and iPhone
Hello Chuck; Assuming an instance with concurrent request processing turned on, if there are a number of sessions (or even stateless users) on the same instance with a large volume of transactions, will the streaming WORequest multiplex with the other requests? My understanding was that the WebObjects adaptor queues requests into an instance rather than multiplexes them. So if a large transaction arrives from a slow pipe, will it not block the other requests until either the adaptor times it out or a response is returned to the client? PS: The javadoc for WORequests refers to the wis request handler -- I hadn't heard of this one before! cheers. Are you using the streaming handler for uploads? If you are, there should not be any timeouts from the adaptor. I've seen uploads of large files over slow connections to GVC.SiteMaker go on for a very, very long time with no timeout. ... I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. ... In my case, I don't think upping the adaptor timeout will block since WOAllowsConcurrentRequestHandling is set to true. Does that sound correct? ___ Andrew Lindesay www.lindesay.co.nz ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO Long Response and iPhone
Hello Anjo; Does each apache handling thread eventually have an on-going connection to every instance in the deployment? cheers. The (apache) adaptor maintains a connection per-thread. So you can easily have a slow and a fast request concurrently. Only when they land in the app, depending on if you have CCR on or off they will queue up. ___ Andrew Lindesay www.lindesay.co.nz ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO Long Response and iPhone
Am 15.01.2010 um 09:58 schrieb Andrew Lindesay: Does each apache handling thread eventually have an on-going connection to every instance in the deployment? Yes? No? Doesn't compute? When you have - say - two instances and two requests and the one isn't finished when the second comes in, yeah, sure. But they close down when they are done. Cheers, Anjo ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using ERRest but with extensions for non EOF back-end
The existing API uses the entity delegate API. On 14 Jan 2010, at 17:38, Mike Schrag wrote: are you use the entity delegate api or the route controller api? On Jan 14, 2010, at 11:36 AM, Brook, James wrote: We have a WebObjects application that uses the ERRest framework to provide a RESTful API over our EOModel. We now want to extend the API to cover some other legacy back-office services and persistence mechanisms as well. The plan is to use fairly plain Java objects and perhaps key value coding. Is there a straightforward path to support this, while making the RESTful API look seamless across the EOF and the alternative back-end logic? I am concerned that we might have to make lots of adaptations to support this model. Any tips would be very much appreciated. -- James ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.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: http://lists.apple.com/mailman/options/webobjects-dev/jbrook%40upcbroadband.com This email sent to jbr...@upcbroadband.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO Long Response and iPhone
I thought that as long as bytes are flowing that the request won't timeout. Isn't the adaptor timeout based on lack of activity? I'm with chuck --- I have an app that does enormous (multigig) uploada to a DA without any timeouts. ms Sent from my iPhone On Jan 15, 2010, at 12:48 AM, Chuck Hillch...@global-village.net wrote: It has been a while since I implemented this. I think the streamToFilePath binding is what you need to use. What bindings are you using? Chuck On Jan 14, 2010, at 8:44 PM, Joe Moreno wrote: Chuck, I hadn't considered that. I am using a direct action form post to handle the upload. - Joe On Jan 14, 2010, at 20:40:08, Chuck Hill wrote: Are you using the streaming handler for uploads? If you are, there should not be any timeouts from the adaptor. I've seen uploads of large files over slow connections to GVC.SiteMaker go on for a very, very long time with no timeout. Chuck On Jan 14, 2010, at 8:27 PM, Joe Moreno wrote: Thanks for the reply. I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. In my case, I don't think upping the adaptor timeout will block since WOAllowsConcurrentRequestHandling is set to true. Does that sound correct? On Jan 14, 2010, at 15:57:08, Andrew Lindesay wrote: Hello Joe; My LEWOStuff framework (JSON-RPC) has a system whereby a file is broken up into little chunks and fired into a WOA bit by bit in sequence into a stream. I haven't explicitly tested this from iPhoneOS, but it has been used in a production system from MacOS- X to move video files around. You could build something similar to this. I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. cheers. Does anyone have a recommendation on how to manage a file upload from say, an iPhone, to a WO app (direct action) that takes longer than the WO adaptor time out? Or, should I just set the WO adaptor timeout to something like five or ten minutes to handle slow/flaky EDGE connections? ___ Andrew Lindesay www.lindesay.co.nz ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using ERRest but with extensions for non EOF back-end
Pretty sure you can't do this ... I think the entity delegate stuff is entirely EOEntity-baed. When I made the newer route controller approach, support for non-entity objects was part of the requirements for it. I started to backport it to the entity delegates, but it was just too big of a change for an API and it would have caused problems with the D2Rest code, which requires entities. You COULD choose to mix the entity delegates and newer stuff, i think ... So you don't have to throw away the code you've already written for the entity delegates. ms On Jan 15, 2010, at 6:18 AM, Brook, James wrote: The existing API uses the entity delegate API. On 14 Jan 2010, at 17:38, Mike Schrag wrote: are you use the entity delegate api or the route controller api? On Jan 14, 2010, at 11:36 AM, Brook, James wrote: We have a WebObjects application that uses the ERRest framework to provide a RESTful API over our EOModel. We now want to extend the API to cover some other legacy back-office services and persistence mechanisms as well. The plan is to use fairly plain Java objects and perhaps key value coding. Is there a straightforward path to support this, while making the RESTful API look seamless across the EOF and the alternative back-end logic? I am concerned that we might have to make lots of adaptations to support this model. Any tips would be very much appreciated. -- James ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.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: http://lists.apple.com/mailman/options/webobjects-dev/jbrook%40upcbroadband.com This email sent to jbr...@upcbroadband.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: D2WS Assistant
I couldn't get the WSAssistant to work at all. With or without wonder, it seems totally broken. Also, D2WS in 5.4 will not work with Wonder's D2W, because it requires that the rule model descends from D2WFastModel or some such. Also, WOWS fails on WSDLs with XSD imports, so if you are trying to client with a server that isn't WO, be aware. Ramsey On Jan 14, 2010, at 11:15 PM, Mat Johnson wrote: Does the Assistant still work in WO 5.4 and Eclipse or is it right to the Rules Editor? ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com This email sent to rgur...@mac.com smime.p7s Description: S/MIME cryptographic signature ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using ERRest but with extensions for non EOF back-end
Thank you Mike. I hadn't seen the route controller approach until you mentioned it. I think it's perfect for our needs - brilliant! We were already working on the idea that we would have two separate API apps because one part is mission critical and the other is a less important layer over the top. There are no collisions in the end points, so we hope to includes the EOEntity based one in both apps and extend on it with the non EO stuff in just one of the apps. Hopefully the two approaches will mix nicely with each other. On 15 Jan 2010, at 13:19, Mike Schrag wrote: Pretty sure you can't do this ... I think the entity delegate stuff is entirely EOEntity-baed. When I made the newer route controller approach, support for non-entity objects was part of the requirements for it. I started to backport it to the entity delegates, but it was just too big of a change for an API and it would have caused problems with the D2Rest code, which requires entities. You COULD choose to mix the entity delegates and newer stuff, i think ... So you don't have to throw away the code you've already written for the entity delegates. ms On Jan 15, 2010, at 6:18 AM, Brook, James wrote: The existing API uses the entity delegate API. On 14 Jan 2010, at 17:38, Mike Schrag wrote: are you use the entity delegate api or the route controller api? On Jan 14, 2010, at 11:36 AM, Brook, James wrote: We have a WebObjects application that uses the ERRest framework to provide a RESTful API over our EOModel. We now want to extend the API to cover some other legacy back-office services and persistence mechanisms as well. The plan is to use fairly plain Java objects and perhaps key value coding. Is there a straightforward path to support this, while making the RESTful API look seamless across the EOF and the alternative back-end logic? I am concerned that we might have to make lots of adaptations to support this model. Any tips would be very much appreciated. -- James ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.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: http://lists.apple.com/mailman/options/webobjects-dev/jbrook%40upcbroadband.com This email sent to jbr...@upcbroadband.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO Long Response and iPhone
On Jan 14, 2010, at 3:19 PM, Joe Moreno wrote: Does anyone have a recommendation on how to manage a file upload from say, an iPhone, to a WO app (direct action) that takes longer than the WO adaptor time out? Or, should I just set the WO adaptor timeout to something like five or ten minutes to handle slow/flaky EDGE connections? Thanks, Joe ___ There is probably some more documentation that can go into the use of this component. Actually, there is more than one choice for this. com.webobjects.woextensions.WOLongResponsePage (Apple version) er.ajax.AjaxLongResponse er.extensions.concurrency.ERXLongResponsePage (and ERXLongResponseTask) er.extensions.concurrency.ERXWOLongResponsePage com.webobjects.woextensions.WOLongResponsePage (Wonder version) So, there are three different flavors? Why ERX and ERXWO and Ajax of the same thing? Perhaps it is just a general rule for understanding Wonder: There are at least three ways of doing anything: ak-ish, ms-ish, and ch-ish. :-) It kind of makes as much sense as any other explanation - ray ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Modeling an optional to-one relationship
Hi Mark, On Jan 15, 2010, at 12:08 AM, Mark Ritchie wrote: Hi Chuck! On 14/Jan/2010, at 1:46 PM, Chuck Hill wrote: On Jan 14, 2010, at 3:36 AM, Mark Ritchie wrote: Yes, I believe that's the intended behaviour... The DatabaseContext tracks that newly created EO and throws an exception if you attempt to modify and then save it. Almost, it throws when the fault is fired. Hrm, in test case that I constructed, that's not what I observe. I'm using WOF 5.4.3, Java 1.5 on my development machine. I wonder if we are mis-communicating. What are you describing below seems to be the default behavior if NOT using the delegate method from Kelly Hawk. Is this below result from the code you posted later (Application.java)? Using the Movies EOModel and local mysql: I fetch a Talent EO. I ask for it's photo and get back a fault for the TalentPhoto EO (as expected.) Kelly's delegate method should throw here (or maybe in the step before). Chuck I fire the fault and get back a TalentPhoto EO with PK set and nil values. EODatabaseContext.objectsWithMissingGlobalIds() confirms that it's tracking the TalentPhoto EO for me. I make a change to the Talent EO and save it. All is good. I make changes to TalentPhoto:set a photo and set it's talent relationship to the Talent EO. Then when I try to save changes, EOF tosses a EOObjectNotAvailableException with this explanation: prepareForSaveWithCoordinator: Cannot save the object with globalID _EOIntegralKeyGlobalID[TalentPhoto (java.lang.Integer)1]. The row referenced by this globalID was missing from the database at the time a fetch was attempted. Either it was removed from the database after this application got a pointer to it, or there is a referential integrity problem with your database. To be notified when fetches fail, implement a delegate on EODatabaseContext that responds to databaseContextFailedToFetchObject(). That explanation seems to match what I've done and the behaviour seems to match the documentation for EODatabaseContext's delegate databaseContextFailedToFetchObject(). http://tr.im/dcdelegate What am I doing differently then you? No DB Context delegate is my guess. :-) You may also find this code useful or interesting. /** * Detecting WO 5 dummy fault EOs. The code below is a translation of code posted here: * From http://wodeveloper.com/omniLists/eof/2001/November/msg00023.html * * As of WO4.5, EOF resolves faults for objects that don't exist in the database to a dummy object with mostly empty attributes (except those that are set in -init), whereas earlier versions of EOF threw a _fireFault exception. This method detects whether the receiver is such a dummy object. * * A distinguishing feature of these dummy EOs is that they don't have a corresponding database context snapshot, so we use this to detect its dummy-ness. This seems more robust than checking if all or most attributes are empty, since these can be changed by client code. * * Dummy fault EOs should be removed from the editingContext (using forgetObject) before it is invalidated (invalidateAllObjects or invalidateObjectWithGlobalID), otherwise an unrecoverable decrementSnapshotCountForGlobalID - unable to decrement snapshot count for object with global ID exception is thrown by EOF.brbr * * See also: http://www.omnigroup.com/mailman/archive/eof/2001-May/001988.html andfollowing. */ public static boolean isDummyFaultEO(EOEnterpriseObject anObject) { /** require [valid_param] anObject != null; **/ JassAdditions.pre(EOObject, isDummyFaultEO [object_in_ec], anObject.editingContext() != null); JassAdditions.pre(EOObject, isDummyFaultEO [object_has_global_id], anObject.editingContext().globalIDForObject(anObject) != null); boolean isDummyFaultEO = false; // This method will fail if the object is still a fault. We fire the fault so that the correct result is returned. if (anObject.isFault()) { try { anObject.willRead(); } catch (EOObjectNotAvailableException e) { // The DatabaseContextDeletgate restores the throw on failure to fetch functionality and throws EOObjectNotAvailableException // That is caught here and true returned so that this method will return the expected result even when this delegate is used return true; } } EOEditingContext ec = anObject.editingContext(); EOGlobalID globalID = ec.globalIDForObject(anObject); // NB. objects with temporary globalIDs legitimately have no DB snapshots, since these are by definition not yet saved to the database. if (! globalID.isTemporary()) { // Find the EODatabaseContext instance associated with
Re: WO Long Response and iPhone
On Jan 15, 2010, at 12:21 AM, Andrew Lindesay wrote: Hello Chuck; Assuming an instance with concurrent request processing turned on, if there are a number of sessions (or even stateless users) on the same instance with a large volume of transactions, will the streaming WORequest multiplex with the other requests? Not sure what you mean by multiplex. I think it may use a WOWorkerThread for the duration of the upload, but I am not certain. My understanding was that the WebObjects adaptor queues requests into an instance rather than multiplexes them. Instances will accept request up to # of Worker Threads + Listen Queue Size. More than that, and the adaptor will return an error message. Worker Threads process in parallel, subject to single threaded locks in EOF. So if a large transaction arrives from a slow pipe, will it not block the other requests until either the adaptor times it out or a response is returned to the client? Not if concurrent request processing is on. It will block that one session and WOWorkerThread (again, I think). PS: The javadoc for WORequests refers to the wis request handler -- I hadn't heard of this one before! That is for direct actions. Chuck cheers. Are you using the streaming handler for uploads? If you are, there should not be any timeouts from the adaptor. I've seen uploads of large files over slow connections to GVC.SiteMaker go on for a very, very long time with no timeout. ... I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. ... In my case, I don't think upping the adaptor timeout will block since WOAllowsConcurrentRequestHandling is set to true. Does that sound correct? ___ Andrew Lindesay www.lindesay.co.nz -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO Long Response and iPhone
On Jan 15, 2010, at 4:04 AM, msch...@mdimension.com wrote: I thought that as long as bytes are flowing that the request won't timeout. Correct. The problem with the non-streaming version (the data binding, I think) is that Apache would accumulate the _entire_ upload before passing it to the WO adaptor. During that time, the session could time out. With streaming, the request goes to the app immediately and checks out the session preventing timeout. The streaming upload was a very nice change both for memory management and for preventing session time out. Chuck Isn't the adaptor timeout based on lack of activity? I'm with chuck --- I have an app that does enormous (multigig) uploada to a DA without any timeouts. ms Sent from my iPhone On Jan 15, 2010, at 12:48 AM, Chuck Hillch...@global-village.net wrote: It has been a while since I implemented this. I think the streamToFilePath binding is what you need to use. What bindings are you using? Chuck On Jan 14, 2010, at 8:44 PM, Joe Moreno wrote: Chuck, I hadn't considered that. I am using a direct action form post to handle the upload. - Joe On Jan 14, 2010, at 20:40:08, Chuck Hill wrote: Are you using the streaming handler for uploads? If you are, there should not be any timeouts from the adaptor. I've seen uploads of large files over slow connections to GVC.SiteMaker go on for a very, very long time with no timeout. Chuck On Jan 14, 2010, at 8:27 PM, Joe Moreno wrote: Thanks for the reply. I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. In my case, I don't think upping the adaptor timeout will block since WOAllowsConcurrentRequestHandling is set to true. Does that sound correct? On Jan 14, 2010, at 15:57:08, Andrew Lindesay wrote: Hello Joe; My LEWOStuff framework (JSON-RPC) has a system whereby a file is broken up into little chunks and fired into a WOA bit by bit in sequence into a stream. I haven't explicitly tested this from iPhoneOS, but it has been used in a production system from MacOS-X to move video files around. You could build something similar to this. I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. cheers. Does anyone have a recommendation on how to manage a file upload from say, an iPhone, to a WO app (direct action) that takes longer than the WO adaptor time out? Or, should I just set the WO adaptor timeout to something like five or ten minutes to handle slow/flaky EDGE connections? ___ Andrew Lindesay www.lindesay.co.nz ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Modeling an optional to-one relationship
On 15/Jan/2010, at 10:52 AM, Chuck Hill wrote: I wonder if we are mis-communicating. What are you describing below seems to be the default behavior if NOT using the delegate method from Kelly Hawk. Is this below result from the code you posted later (Application.java)? Oh yes, I should have been more clear. My example is using the default 5.4.3 behaviour. Kelly's code is not loaded. Thanks btw to the pointer to it in Wonder. As usual, I was lost because I neglected to properly mangle the name! ;-) M. ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Modeling an optional to-one relationship
On Jan 15, 2010, at 11:14 AM, Mark Ritchie wrote: On 15/Jan/2010, at 10:52 AM, Chuck Hill wrote: I wonder if we are mis-communicating. What are you describing below seems to be the default behavior if NOT using the delegate method from Kelly Hawk. Is this below result from the code you posted later (Application.java)? Oh yes, I should have been more clear. My example is using the default 5.4.3 behaviour. OK, good. What you are describing is also what I expect the default 5.4.3 behaviour to be. We are all good here. :-) Chuck Kelly's code is not loaded. Thanks btw to the pointer to it in Wonder. As usual, I was lost because I neglected to properly mangle the name! ;-) M. -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Modeling an optional to-one relationship
On 15/Jan/2010, at 11:04 AM, Chuck Hill wrote: On Jan 15, 2010, at 9:44 AM, Mark Ritchie wrote: Personally, I like the way that EOF is handling the case. It works for reading and it correctly warns you when you attempt to change something that never existed in the first place. There is also programatic access to detect the case How are you doing this? Is it much different than the code I sent a few minutes ago? Hi Chuck! From the code which I posted before, this is the method which asks the DC associated with the given EO for all the objects which didn't exist in the database using the missingObjectGlobalIDs() method. private void logObjectsMissingGIDs(EOEditingContext context, EOEnterpriseObject eo){ EOObjectStore os = context.rootObjectStore(); if(os instanceof EOObjectStoreCoordinator){ EOObjectStoreCoordinator osc = (EOObjectStoreCoordinator)os; EOObjectStore os2 = osc.objectStoreForObject(eo); if(os2 instanceof EODatabaseContext){ EODatabaseContext dc = (EODatabaseContext)os2; NSArrayEOEnterpriseObject objectsWithMissingGlobalIds = dc.missingObjectGlobalIDs(); NSLog.err.appendln(objectsWithMissingGlobalIds = + objectsWithMissingGlobalIds); } } } M. ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Modeling an optional to-one relationship
On 15/Jan/2010, at 11:17 AM, Chuck Hill wrote: OK, good. What you are describing is also what I expect the default 5.4.3 behaviour to be. We are all good here. :-) Ah ok, sorry about bending your head on that one... ;-) However, always nice to have our idea of reality shaken from time to time... As a opportunity for a sanity check! ;-) M. ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Modeling an optional to-one relationship
On Jan 15, 2010, at 11:18 AM, Mark Ritchie wrote: On 15/Jan/2010, at 11:04 AM, Chuck Hill wrote: On Jan 15, 2010, at 9:44 AM, Mark Ritchie wrote: Personally, I like the way that EOF is handling the case. It works for reading and it correctly warns you when you attempt to change something that never existed in the first place. There is also programatic access to detect the case How are you doing this? Is it much different than the code I sent a few minutes ago? Hi Chuck! From the code which I posted before, this is the method which asks the DC associated with the given EO for all the objects which didn't exist in the database using the missingObjectGlobalIDs() method. private void logObjectsMissingGIDs(EOEditingContext context, EOEnterpriseObject eo){ EOObjectStore os = context.rootObjectStore(); if(os instanceof EOObjectStoreCoordinator){ EOObjectStoreCoordinator osc = (EOObjectStoreCoordinator)os; EOObjectStore os2 = osc.objectStoreForObject(eo); if(os2 instanceof EODatabaseContext){ EODatabaseContext dc = (EODatabaseContext)os2; NSArrayEOEnterpriseObject objectsWithMissingGlobalIds = dc.missingObjectGlobalIDs(); That is an interesting alternative. NSLog.err.appendln(objectsWithMissingGlobalIds = + objectsWithMissingGlobalIds); } } } M. -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO Long Response and iPhone
Chuck, I think the streamToFilePath binding is what you need to use. What bindings are you using? I'm not using a WODynamicElement (i.e. WOFileUpload). This is a direct action for third party APIs to call so there is no UI. Or, am I misunderstanding your question? Thanks, Joe On Jan 14, 2010, at 21:47:45, Chuck Hill wrote: It has been a while since I implemented this. I think the streamToFilePath binding is what you need to use. What bindings are you using? Chuck On Jan 14, 2010, at 8:44 PM, Joe Moreno wrote: Chuck, I hadn't considered that. I am using a direct action form post to handle the upload. - Joe On Jan 14, 2010, at 20:40:08, Chuck Hill wrote: Are you using the streaming handler for uploads? If you are, there should not be any timeouts from the adaptor. I've seen uploads of large files over slow connections to GVC.SiteMaker go on for a very, very long time with no timeout. Chuck On Jan 14, 2010, at 8:27 PM, Joe Moreno wrote: Thanks for the reply. I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. In my case, I don't think upping the adaptor timeout will block since WOAllowsConcurrentRequestHandling is set to true. Does that sound correct? On Jan 14, 2010, at 15:57:08, Andrew Lindesay wrote: Hello Joe; My LEWOStuff framework (JSON-RPC) has a system whereby a file is broken up into little chunks and fired into a WOA bit by bit in sequence into a stream. I haven't explicitly tested this from iPhoneOS, but it has been used in a production system from MacOS- X to move video files around. You could build something similar to this. I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. cheers. Does anyone have a recommendation on how to manage a file upload from say, an iPhone, to a WO app (direct action) that takes longer than the WO adaptor time out? Or, should I just set the WO adaptor timeout to something like five or ten minutes to handle slow/flaky EDGE connections? ___ Andrew Lindesay www.lindesay.co.nz ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO Long Response and iPhone
On Jan 15, 2010, at 1:49 PM, Joe Moreno wrote: Chuck, I think the streamToFilePath binding is what you need to use. What bindings are you using? I'm not using a WODynamicElement (i.e. WOFileUpload). This is a direct action for third party APIs to call so there is no UI. Or, am I misunderstanding your question? That does make it harder. See WORequest.contentInputStream() and also on your disk /Developer/Examples/JavaWebObjects/FileUpload Chuck On Jan 14, 2010, at 21:47:45, Chuck Hill wrote: It has been a while since I implemented this. I think the streamToFilePath binding is what you need to use. What bindings are you using? Chuck On Jan 14, 2010, at 8:44 PM, Joe Moreno wrote: Chuck, I hadn't considered that. I am using a direct action form post to handle the upload. - Joe On Jan 14, 2010, at 20:40:08, Chuck Hill wrote: Are you using the streaming handler for uploads? If you are, there should not be any timeouts from the adaptor. I've seen uploads of large files over slow connections to GVC.SiteMaker go on for a very, very long time with no timeout. Chuck On Jan 14, 2010, at 8:27 PM, Joe Moreno wrote: Thanks for the reply. I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. In my case, I don't think upping the adaptor timeout will block since WOAllowsConcurrentRequestHandling is set to true. Does that sound correct? On Jan 14, 2010, at 15:57:08, Andrew Lindesay wrote: Hello Joe; My LEWOStuff framework (JSON-RPC) has a system whereby a file is broken up into little chunks and fired into a WOA bit by bit in sequence into a stream. I haven't explicitly tested this from iPhoneOS, but it has been used in a production system from MacOS-X to move video files around. You could build something similar to this. I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. cheers. Does anyone have a recommendation on how to manage a file upload from say, an iPhone, to a WO app (direct action) that takes longer than the WO adaptor time out? Or, should I just set the WO adaptor timeout to something like five or ten minutes to handle slow/flaky EDGE connections? ___ Andrew Lindesay www.lindesay.co.nz ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO Long Response and iPhone
I have the code to do this ... I'll send it. You get a multipart iterator on the request and then get a stream from the part. Sent from my iPhone On Jan 15, 2010, at 6:41 PM, Chuck Hillch...@global-village.net wrote: On Jan 15, 2010, at 1:49 PM, Joe Moreno wrote: Chuck, I think the streamToFilePath binding is what you need to use. What bindings are you using? I'm not using a WODynamicElement (i.e. WOFileUpload). This is a direct action for third party APIs to call so there is no UI. Or, am I misunderstanding your question? That does make it harder. See WORequest.contentInputStream() and also on your disk /Developer/Examples/JavaWebObjects/FileUpload Chuck On Jan 14, 2010, at 21:47:45, Chuck Hill wrote: It has been a while since I implemented this. I think the streamToFilePath binding is what you need to use. What bindings are you using? Chuck On Jan 14, 2010, at 8:44 PM, Joe Moreno wrote: Chuck, I hadn't considered that. I am using a direct action form post to handle the upload. - Joe On Jan 14, 2010, at 20:40:08, Chuck Hill wrote: Are you using the streaming handler for uploads? If you are, there should not be any timeouts from the adaptor. I've seen uploads of large files over slow connections to GVC.SiteMaker go on for a very, very long time with no timeout. Chuck On Jan 14, 2010, at 8:27 PM, Joe Moreno wrote: Thanks for the reply. I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. In my case, I don't think upping the adaptor timeout will block since WOAllowsConcurrentRequestHandling is set to true. Does that sound correct? On Jan 14, 2010, at 15:57:08, Andrew Lindesay wrote: Hello Joe; My LEWOStuff framework (JSON-RPC) has a system whereby a file is broken up into little chunks and fired into a WOA bit by bit in sequence into a stream. I haven't explicitly tested this from iPhoneOS, but it has been used in a production system from MacOS-X to move video files around. You could build something similar to this. I wouldn't up the time on the adaptor because other clients who are using that instance will get blocked and may reach their timeouts. cheers. Does anyone have a recommendation on how to manage a file upload from say, an iPhone, to a WO app (direct action) that takes longer than the WO adaptor time out? Or, should I just set the WO adaptor timeout to something like five or ten minutes to handle slow/flaky EDGE connections? ___ Andrew Lindesay www.lindesay.co.nz ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
ERXKey/MySQL relationship not null
Hi, I'm trying to get a list of entities who has a relationship that is not null so my ERXKey qualifier looks like entity.relationship.isNotNull() When I look at the SQL generated it is making sure that the primary key of the entity is not null and it is not looking at the relationship at all. Is that the expected behavior or is it a bug with the MySQL plugin? WO 5.4.3, MySQL, Wonder recent ;) Thanks in advance, Johnny ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERXKey/MySQL relationship not null
there's more than one entity at play here ... please include example entity names and the exact generated sql. On Jan 15, 2010, at 8:18 PM, Johnny Miller wrote: Hi, I'm trying to get a list of entities who has a relationship that is not null so my ERXKey qualifier looks like entity.relationship.isNotNull() When I look at the SQL generated it is making sure that the primary key of the entity is not null and it is not looking at the relationship at all. Is that the expected behavior or is it a bug with the MySQL plugin? WO 5.4.3, MySQL, Wonder recent ;) Thanks in advance, Johnny ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERXKey/MySQL relationship not null
Hi Mike, The two entities Artist - Artwork The qualifier is Artist.ARTWORKS.isNotNull() The generated SQL com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: SELECT RTRIM(t0.BIO), t0.CREATE_DATE, RTRIM(t0.FIRST_NAME), t0.ID, t0.IMAGE, t0.LAST_MODIFIED, RTRIM(t0.LAST_NAME) FROM ARTIST t0 WHERE t0.ID is not NULL ORDER BY t0.LAST_NAME ASC, t0.FIRST_NAME ASC withBindings: Thanks a lot, Johnny On Jan 15, 2010, at 3:21 PM, Mike Schrag wrote: there's more than one entity at play here ... please include example entity names and the exact generated sql. On Jan 15, 2010, at 8:18 PM, Johnny Miller wrote: Hi, I'm trying to get a list of entities who has a relationship that is not null so my ERXKey qualifier looks like entity.relationship.isNotNull() When I look at the SQL generated it is making sure that the primary key of the entity is not null and it is not looking at the relationship at all. Is that the expected behavior or is it a bug with the MySQL plugin? WO 5.4.3, MySQL, Wonder recent ;) Thanks in advance, Johnny ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERXKey/MySQL relationship not null
oh .. actually this is a qualifier in my own code that isn't in wonder. whoops. i think there's a houdah one for this? On Jan 15, 2010, at 8:44 PM, Johnny Miller wrote: I'm not familiar with that qualifier (but I've sure been looking for it :) ). Can you please point me in the right direction or provide an example? On Jan 15, 2010, at 3:39 PM, Mike Schrag wrote: isNotNull only really makes sense on a to-one ... you probably want to use the to-many count qualifier (or something like it) for a to-many. On Jan 15, 2010, at 8:38 PM, Johnny Miller wrote: Hi Mike, The two entities Artist - Artwork The qualifier is Artist.ARTWORKS.isNotNull() The generated SQL com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: SELECT RTRIM(t0.BIO), t0.CREATE_DATE, RTRIM(t0.FIRST_NAME), t0.ID, t0.IMAGE, t0.LAST_MODIFIED, RTRIM(t0.LAST_NAME) FROM ARTIST t0 WHERE t0.ID is not NULL ORDER BY t0.LAST_NAME ASC, t0.FIRST_NAME ASC withBindings: Thanks a lot, Johnny On Jan 15, 2010, at 3:21 PM, Mike Schrag wrote: there's more than one entity at play here ... please include example entity names and the exact generated sql. On Jan 15, 2010, at 8:18 PM, Johnny Miller wrote: Hi, I'm trying to get a list of entities who has a relationship that is not null so my ERXKey qualifier looks like entity.relationship.isNotNull() When I look at the SQL generated it is making sure that the primary key of the entity is not null and it is not looking at the relationship at all. Is that the expected behavior or is it a bug with the MySQL plugin? WO 5.4.3, MySQL, Wonder recent ;) Thanks in advance, Johnny ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERXKey/MySQL relationship not null
this is REALLY non-optimal fetching here, but if it works for you, cool ... ms On Jan 15, 2010, at 10:53 PM, Johnny Miller wrote: Well at least there is a good reason I didn't find it. After thinking about the query as SQL I decided to just use the in qualifier. i.e. Artist.fetchMG_Artists(ec(), Artist.ARTWORKS.in(Artwork.fetchAllMG_Artworks(ec())), so); Thanks for the help. Johnny On Jan 15, 2010, at 4:00 PM, Mike Schrag wrote: oh .. actually this is a qualifier in my own code that isn't in wonder. whoops. i think there's a houdah one for this? On Jan 15, 2010, at 8:44 PM, Johnny Miller wrote: I'm not familiar with that qualifier (but I've sure been looking for it :) ). Can you please point me in the right direction or provide an example? On Jan 15, 2010, at 3:39 PM, Mike Schrag wrote: isNotNull only really makes sense on a to-one ... you probably want to use the to-many count qualifier (or something like it) for a to-many. On Jan 15, 2010, at 8:38 PM, Johnny Miller wrote: Hi Mike, The two entities Artist - Artwork The qualifier is Artist.ARTWORKS.isNotNull() The generated SQL com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: SELECT RTRIM(t0.BIO), t0.CREATE_DATE, RTRIM(t0.FIRST_NAME), t0.ID, t0.IMAGE, t0.LAST_MODIFIED, RTRIM(t0.LAST_NAME) FROM ARTIST t0 WHERE t0.ID is not NULL ORDER BY t0.LAST_NAME ASC, t0.FIRST_NAME ASC withBindings: Thanks a lot, Johnny On Jan 15, 2010, at 3:21 PM, Mike Schrag wrote: there's more than one entity at play here ... please include example entity names and the exact generated sql. On Jan 15, 2010, at 8:18 PM, Johnny Miller wrote: Hi, I'm trying to get a list of entities who has a relationship that is not null so my ERXKey qualifier looks like entity.relationship.isNotNull() When I look at the SQL generated it is making sure that the primary key of the entity is not null and it is not looking at the relationship at all. Is that the expected behavior or is it a bug with the MySQL plugin? WO 5.4.3, MySQL, Wonder recent ;) Thanks in advance, Johnny ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERXKey/MySQL relationship not null
Well at least there is a good reason I didn't find it. After thinking about the query as SQL I decided to just use the in qualifier. i.e. Artist.fetchMG_Artists(ec(), Artist.ARTWORKS.in(Artwork.fetchAllMG_Artworks(ec())), so); Thanks for the help. Johnny On Jan 15, 2010, at 4:00 PM, Mike Schrag wrote: oh .. actually this is a qualifier in my own code that isn't in wonder. whoops. i think there's a houdah one for this? On Jan 15, 2010, at 8:44 PM, Johnny Miller wrote: I'm not familiar with that qualifier (but I've sure been looking for it :) ). Can you please point me in the right direction or provide an example? On Jan 15, 2010, at 3:39 PM, Mike Schrag wrote: isNotNull only really makes sense on a to-one ... you probably want to use the to-many count qualifier (or something like it) for a to-many. On Jan 15, 2010, at 8:38 PM, Johnny Miller wrote: Hi Mike, The two entities Artist - Artwork The qualifier is Artist.ARTWORKS.isNotNull() The generated SQL com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: SELECT RTRIM(t0.BIO), t0.CREATE_DATE, RTRIM(t0.FIRST_NAME), t0.ID, t0.IMAGE, t0.LAST_MODIFIED, RTRIM(t0.LAST_NAME) FROM ARTIST t0 WHERE t0.ID is not NULL ORDER BY t0.LAST_NAME ASC, t0.FIRST_NAME ASC withBindings: Thanks a lot, Johnny On Jan 15, 2010, at 3:21 PM, Mike Schrag wrote: there's more than one entity at play here ... please include example entity names and the exact generated sql. On Jan 15, 2010, at 8:18 PM, Johnny Miller wrote: Hi, I'm trying to get a list of entities who has a relationship that is not null so my ERXKey qualifier looks like entity.relationship.isNotNull() When I look at the SQL generated it is making sure that the primary key of the entity is not null and it is not looking at the relationship at all. Is that the expected behavior or is it a bug with the MySQL plugin? WO 5.4.3, MySQL, Wonder recent ;) Thanks in advance, Johnny ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERXKey/MySQL relationship not null
Yeah, I started thinking about that ... there is not a lot of data but I'll probably use a different solution. Johnny On Jan 15, 2010, at 5:55 PM, Mike Schrag wrote: this is REALLY non-optimal fetching here, but if it works for you, cool ... ms On Jan 15, 2010, at 10:53 PM, Johnny Miller wrote: Well at least there is a good reason I didn't find it. After thinking about the query as SQL I decided to just use the in qualifier. i.e. Artist.fetchMG_Artists(ec(), Artist.ARTWORKS.in(Artwork.fetchAllMG_Artworks(ec())), so); Thanks for the help. Johnny On Jan 15, 2010, at 4:00 PM, Mike Schrag wrote: oh .. actually this is a qualifier in my own code that isn't in wonder. whoops. i think there's a houdah one for this? On Jan 15, 2010, at 8:44 PM, Johnny Miller wrote: I'm not familiar with that qualifier (but I've sure been looking for it :) ). Can you please point me in the right direction or provide an example? On Jan 15, 2010, at 3:39 PM, Mike Schrag wrote: isNotNull only really makes sense on a to-one ... you probably want to use the to-many count qualifier (or something like it) for a to-many. On Jan 15, 2010, at 8:38 PM, Johnny Miller wrote: Hi Mike, The two entities Artist - Artwork The qualifier is Artist.ARTWORKS.isNotNull() The generated SQL com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: SELECT RTRIM(t0.BIO), t0.CREATE_DATE, RTRIM(t0.FIRST_NAME), t0.ID, t0.IMAGE, t0.LAST_MODIFIED, RTRIM(t0.LAST_NAME) FROM ARTIST t0 WHERE t0.ID is not NULL ORDER BY t0.LAST_NAME ASC, t0.FIRST_NAME ASC withBindings: Thanks a lot, Johnny On Jan 15, 2010, at 3:21 PM, Mike Schrag wrote: there's more than one entity at play here ... please include example entity names and the exact generated sql. On Jan 15, 2010, at 8:18 PM, Johnny Miller wrote: Hi, I'm trying to get a list of entities who has a relationship that is not null so my ERXKey qualifier looks like entity.relationship.isNotNull() When I look at the SQL generated it is making sure that the primary key of the entity is not null and it is not looking at the relationship at all. Is that the expected behavior or is it a bug with the MySQL plugin? WO 5.4.3, MySQL, Wonder recent ;) Thanks in advance, Johnny ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com