Re: ERAttachment... to-many and thumbs

2010-11-24 Thread Denis Frolov
The problem is that you have a relationship to the abstract ERAttachment entity. I see two possible solutions: 1. Make a relationship to specific sub-entity of ERAttachment (e.g. ERFileAttachment). I haven't done this personally, but this should solve your problem. 2. Add support for getting "desti

Re: ERAttachment... to-many and thumbs

2010-11-23 Thread Denis Frolov
On Tue, Nov 23, 2010 at 3:06 PM, Francesco Romano wrote: > On 23/nov/2010, at 12.30, Denis Frolov wrote: > > I think ERAttachmentViewer doesn't resize the image itself - it just passes > the width/height to WOImage. So, this approach is indeed "heavy". You can > create thumbnails upon upload and a

Re: ERAttachment... to-many and thumbs

2010-11-23 Thread Francesco Romano
On 23/nov/2010, at 12.30, Denis Frolov wrote: > I think ERAttachmentViewer doesn't resize the image itself - it just passes > the width/height to WOImage. So, this approach is indeed "heavy". You can > create thumbnails upon upload and add them to "childrenAttachments" > relationship. After tha

Re: ERAttachment... to-many and thumbs

2010-11-22 Thread Francesco Romano
> Are you actually going to display multiple photos for a Product? > > Or are you displaying ... > > one thumbnail > or > one big photo > or > one medium photo > > David What I want is the possibility to have many photos for a product. And i need one thumbnail (but I think I'll thumbnail eve

Re: ERAttachment... to-many and thumbs

2010-11-22 Thread Denis Frolov
On Mon, Nov 22, 2010 at 11:27 PM, Francesco Romano wrote: > Ok.. I'll try this for the thumbnail.. > > About D2W... > I have something like > > Product <-->> ERAttachment for a photos property. > But.. i watched the tutorial of David and he created a many-to-many, so > Product <-->> ProductPhotos

Re: ERAttachment... to-many and thumbs

2010-11-22 Thread David Holt
On 2010-11-22, at 12:27 PM, Francesco Romano wrote: > Ok.. I'll try this for the thumbnail.. > > About D2W... > I have something like > > Product <-->> ERAttachment for a photos property. Are you actually going to display multiple photos for a Product? Or are you displaying ... one thumbnai

Re: ERAttachment... to-many and thumbs

2010-11-22 Thread Francesco Romano
Ok.. I'll try this for the thumbnail.. About D2W... I have something like Product <-->> ERAttachment for a photos property. But.. i watched the tutorial of David and he created a many-to-many, so Product <-->> ProductPhotos <<--> ERAttachment Product has a "photos" property (so a NSArray of ERAtt

Re: ERAttachment... to-many and thumbs

2010-11-22 Thread Denis Frolov
Hi, In fact, the support for thumbnails is already there in the model of ERAttachment. Note the "parentAttachment"/"childrenAttachments" relationships and "thumbnail" attribute. Just create a new ERAttachment for thumbnail and add it to "childrenAttachments" of original attachment. You can use "th

Re: ERAttachment... to-many and thumbs

2010-11-22 Thread David Holt
Hi Francesco, On 2010-11-22, at 8:49 AM, Francesco Romano wrote: > Hi. > I have two questions about ERAttachment. > 1) Thumbnails are not available, yet, but.. what do I have to do to add > support to them? I don't understand how to implement them "inside" > erattachment Model two ERAttachment

Re: ERAttachment... to-many and thumbs

2010-11-22 Thread Kieran Kelleher
Rather than working directly with ERAttachment, just make your own attachment wrapper entity (MyAttachment) with relationships to original ERAttachment and a thumbnail attachment. MyAttachment --- original > ERAttachment MyAttachment --- thumbnail > ERAttachment (fits in say 160 x 160

ERAttachment... to-many and thumbs

2010-11-22 Thread Francesco Romano
Hi. I have two questions about ERAttachment. 1) Thumbnails are not available, yet, but.. what do I have to do to add support to them? I don't understand how to implement them "inside" erattachment 2) I'd like to have a many-to-many relationship between my entity and erattachment. I don't have pro