Re: setUser() vs. setUserRelationship()

2011-08-09 Thread David Avendasora
This is just off the top of my head, but you _can_ model the toManyThousands 
relationship, just don't make it a class property. Then in the EOGenerator 
template you could get all the toMany relationships that are not class 
properties and generate the code to use ERXUnmodeledToManyRelationship for 
those.

But that assumes that all non-class-property toMany relationships should be 
handled this way...

Dave

On Aug 9, 2011, at 5:32 AM, Ricardo J. Parada wrote:

 Yep, modeling an unmodeled relationship… sounds contradictory.
 
 I guess in my dream it was really modeled but generated different accessors 
 during EOGenerate.
 
 :-)
 
 On Aug 5, 2011, at 11:53 AM, Ricardo J. Parada wrote:
 
 Yes, you're right.  :-)
 
 I found ERXUnmodeledToManyRelationship in your presentation but nowhere you 
 said it was part of entity modeler.  
 
 :-)
 
 
 
 On Aug 5, 2011, at 10:41 AM, Kieran Kelleher wrote:
 
 Ricardo,
 
 No, you were dreaming.  :-)
 
 Regards, Kieran.
 (Sent from my iPhone)
 
 
 On Aug 4, 2011, at 5:35 PM, Ricardo J. Parada rpar...@mac.com wrote:
 
 I thought there was something about this in one of the sessions in this 
 WOWODC 2011 but I can't recall.  Something about selecting 
 ERXUnmodeledToManyRelationship in the entity modeler but I don't see it.
 
 Is there such as thing in entity modeler?
 
 Thanks,
 Ricardo
 
 
 
 
 On Aug 2, 2011, at 1:02 PM, Jesse Tayler wrote:
 
 Ok, I haven't even looked yet -- so excuse if I'm off base --
 
 But shouldn't this be a part of the eo-templates?
 
 Just about every model has this potential problem, so is there a reason 
 we can't check off a box in the modeler to suggest this is a unmodeled 
 to-many or something and generate the methods?
 
 Not that making the method is hard or anything, more that it seems like a 
 solid standard practice that should be elevated in visibility?
 
 
 
 On Aug 2, 2011, at 12:55 PM, Kieran Kelleher wrote:
 
 It's easy, …..
 
 (1) Copy and paste the example from that 
 er.extensions.eof.ERXUnmodeledToManyRelationship class javadoc into 
 BBEdit
 
 (2) Do some find/replace editing
 
 (3) Paste the result into your entity class that needs to have the 
 unmodeled toMany relationship.
 
 (4) Delete the model toMany relationship in the relationships pane in 
 the EOModel.
 
 Test, and you are done.
 
 I have thought about having some user-info entry in the model entity 
 that could be used to auto generate this boiler-plate code in the eogen 
 superclass, but it just has not been a priority for me.
 
 Regards, Kieran
 
 
 
 
 
 
 
 On Aug 2, 2011, at 12:42 PM, Jesse Tayler wrote:
 
 
 On Aug 2, 2011, at 12:38 PM, Kieran Kelleher wrote:
 
 On a related note, with regards tens of millions on one side of a 
 to-many …. that will kill your performance on saving a change to that 
 relationship unless you make the relationship a one-sided 
 relationship. @see er.extensions.eof.ERXUnmodeledToManyRelationshipS, 
 D for one solution to that situation. I recommend using an 
 unmodeled toMany for any relationship where the toMany can be in the 
 thousands. YMMV.
 
 this is of interest to me --
 
 any docs or just code to read on this subject?
 
 
 
 
 ___
 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/rparada%40mac.com
 
 This email sent to rpar...@mac.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/rparada%40mac.com
 
 This email sent to rpar...@mac.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/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.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: Expired sessions and relative image links

2011-08-09 Thread Chuck Hill
Hi Tim,

I am not really clear on what you are doing and what the problem is.  This code 
should only affect URLs that get sent into your application.  Which should be 
none.  Why do you have relative URLs to resources?  Have you looked at the BASE 
tag, http://www.w3schools.com/tags/tag_base.asp?  That maybe a better solution 
to your problem.

 What's been causing this for me are requests for 
 Ajax/WebServerResources/ibox/images/bg.png when using AMD.


I don't see why that should be.  Are you using a custom CSS file with the AMD?  
Is the relative URL in there?  That will only work with Wonder, and only if the 
image path is relative to the location of the CSS file in your project.


Chuck


On 2011-08-05, at 12:51 PM, Timothy Worman wrote:

 On Aug 5, 2011, at 12:17 PM, Chuck Hill wrote:
 
 
 On 2011-08-05, at 11:45 AM, Tim Worman wrote:
 
 I'm seeing this now and it's been driving me exactly bat-sh!t crazy. In all 
 the threads I've read on this topic the only thing I haven't found is WHY 
 it happens. Why do any of the transactions on my pages believe that image 
 files are sessions ids? Anybody……….? Bueller………?
 
 The transactions on your pages _don't_ believe that image files are sessions 
 ids.  From that page:
 The request URI looks like this: 
 /cgi-bin/WebObjects/woapp.woa/wo/images/headerart.jpg. 
 
 The /wo/ indicates that it is a session based, component request so WO just 
 hands it off to the WOComponentRequestHandler.  The 
 WOComponentRequestHandler needs a session to handle the request, so it 
 creates one if one does not exist.  After that point it hits the error of 
 the URL being nonsense.
 
 Chuck
 
 Thanks for the explanation Chuck - very much appreciated. After implementing 
 Klaus's code, I'm now  returning 404's on most of the images in my app - so 
 they don't show up at least in development. So, this will fubar deployment. I 
 am using Wonder/apache to rewrite urls. Do I have to get the rewriting 
 involved in referencing my images properly now?
 
 Tim
 
 
 
 
 What's been causing this for me are requests for 
 Ajax/WebServerResources/ibox/images/bg.png when using AMD.
 
 …and maybe others.
 
 Oh, and thanks to Klaus for sharing the code!
 
 Tim Worman
 UCLA GSEIS
 
 
 
 On Sep 4, 2009, at 7:03 PM, Klaus Berkling wrote:
 
 Sometime back in 2005 Kaj Hejer posted a question about having a relative 
 link to an image, and clicking links on the wo app page resulted in their 
 custom 'session expired' page.
 
 The solution was to catch the request for the image in dispatchRequest and 
 return a 404.
 
 Well I recently came acros the same type of problem. I though I'd share 
 the code:
 
http://web.mac.com/kib/page1/files/relative_image.html
 
 If you have sessions that you can't account for, this may be why.
 
 Thanks
 
 kib
 
 The trouble with normal is it always gets worse.
 Bruce Cockburn
 
 Klaus Berkling
 Systems Administrator
 DynEd International, Inc.
 www.dyned.com | www.eskimo.com/~kiberkli

-- 
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: Using AjaxInPlaceEditor in WORepetition

2011-08-09 Thread Chuck Hill

On 2011-08-08, at 2:58 AM, naneon.raym...@neuf.fr naneon.raym...@neuf.fr 
wrote:

 Hi Chuck,
  
  here in attached three pics.
  pic0 is a little table personnel which contains relationship key Project 
  and personneUlr as iID and tempsutil I call txImplication in my code.
  
 
 In EOF terms we would call that a Many to Many (M2M) join table. With an 
 extra attribute that makes things more complex, but still manageable.
 
 
  pic1 is pprec I call it project entity
  
 
 EOPprec should have a to many relationship to EOPersonnel, 
 ==I agree with you but PowerAMC did another thing

You can still put it in your model.  That is what you should do.


 I an not sure what to call this. assigned people?
 ==Yes assigned people. I created my table and relation from PowerAMC. It's 
 this software which create the sql code I used to generate my database.
 The eoPersonnelUlr relationship looks wrong. Or it is poorly named. Is this 
 owner or manager? 
 ==manager
 
  pic2 is personneUlr I call it person Entity
 
 EOPersonnelUlr should also have a to many relationship to EOPersonnel, I an 
 not sure what to call this. projects?
 == yes projects
 
 Then you create a new EOPersonnel, attach it to EOPprec and EOPersonnelUlr 
 (addObjectToBothSidesOfRelationshipWithKey). This object is then what gets 
 edited in your grid, not session.getTxImplication().
 
 Before editing the new EOPersonnel in grid. I must his data. Before saving 
 his data I must have them. So I create variables to have data I would like to 
 save in EOPersonnel
 
 I hope you understand me


You can also create and insert the objects.  If they are not used, then delete 
them before saving.


Chuck

-- 
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: Editing Context Sporadically not Reverting?

2011-08-09 Thread Chuck Hill
Hi Andrew,

Have you gotten anywhere on this?


Chuck


On 2011-07-31, at 12:36 PM, Andrew Lindesay wrote:

 Hi there;
 
 I'm still trying to track this one down; getting closer to the source of the 
 issue, sporadically the exception below (illogically) fires;
 
 - - - - -
 
 EOEditingContext ec = myEo.editingContext(); // actually default ec
   
 String newValue = GEN RANDOM STRING;
 myEo.setFoo(newValue);
   
 if(ec.updatedObjects().isEmpty())
   throw new IllegalStateException(...);
 
 - - - - -
 
 Has anybody got any ideas about what broadly happens between a value being 
 set on an EO and the editing context's updated objects being populated?  -- 
 this may give me some leads.
 
 cheers.
 
  Original Message 
 Subject: Editing Context Sporadically not Reverting?
 Date: Fri, 29 Jul 2011 11:20:34 +1200
 From: Andrew Lindesay a...@lindesay.co.nz
 To: webobjects-dev@lists.apple.com
 
 Hi;
 
 We're seeing a wierd one which I have not previously had come up.
 
 I have an object X living in the default EC which is modified by
 takeValuesFromRequest(..).  In the invokeAction(..) the method
 revert() is invoked on the default EC.  However the modifications on X
 survive the revert.  This happens sporadically.  If I look at
 updatedObjects() on the ec just prior to the revert, when this problem
 arises it seems to think it has no modified objects.
 
 I'm fairly sure that I am sticking to the editing context golden rules
 and are not doing anything terribly wierd.
 
 Has anybody else seen this one?
 
 cheers
 
 -- 
 Andrew Lindesay
 www.silvereye.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







 ___
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: Cayenne

2011-08-09 Thread David Avendasora
Sigh. I can't leave well-enough alone...

On Aug 9, 2011, at 10:38 AM, John Huss wrote:

 No, I mean the user list, like this post.  :-)
 
 On Mon, Aug 8, 2011 at 6:08 PM, David Holt programming...@mac.com wrote:
 Interested parties would like to know what you found interesting! :-)
 
 Is this the list you're thinking of? 
 http://mail-archives.apache.org/mod_mbox/cayenne-dev/201108.mbox/thread
 
 David
 ___
 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/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.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