Re: Qualifier involving many-to-many relationship

2015-01-28 Thread Paul Hoadley
On 29 Jan 2015, at 2:52 pm, Paul Hoadley wrote: >> So, here’s my recommendation: >> >> 1) Make your “Connection” entity have a single integer primary key. Do not >> have a compound PK. > > Is a compound PK going to prevent ERXExistsQualifier working in a case like > this? I can make the chan

Re: Qualifier involving many-to-many relationship

2015-01-28 Thread Paul Hoadley
Hi Aaron, On 29 Jan 2015, at 2:04 pm, Aaron Rosenzweig wrote: > When you turn on the SQL adaptor debugging it will become clear what it is > doing wrong. Then you’ll go “duh!" The generated SQL is: SELECT t0.id, t0.id_no, t0.user_id FROM teacher t0 INNER JOIN connection T1 ON t0.id = T1.teac

Re: Qualifier involving many-to-many relationship

2015-01-28 Thread Aaron Rosenzweig
Hi Paul, When you turn on the SQL adaptor debugging it will become clear what it is doing wrong. Then you’ll go “duh!" It is probably one of those cases where the “joins” that get created don’t make sense in the full context of the query. It’s probably the Object-Relationional “impedance misma

Qualifier involving many-to-many relationship

2015-01-28 Thread Paul Hoadley
Hello, I have two entities in a model: Teacher and School. There is a many-to-many relationship between Teacher and School, represented as Connection, a join entity. So, Teacher and School both have a 'connections' relationship, and Connection has both 'teacher' and 'school'. There are no fl

Re: Getting Selected Values from Subcomponents

2015-01-28 Thread Samuel Pelletier
Hi, The usual way is to have a binding in the MyList component that will contain an array of selected items, you may call it "selectedItems". For the action, is is better to have also have a binding to create a real reusable component. A component should never assume it's parent type to be real

Re: Webobjects-dev Digest, Vol 12, Issue 41

2015-01-28 Thread Daniele Corti
Hi Robet, that's what I want to do! Thank You! I was thinking too much about code, not remembering Bindings are the great function in WO. Thank you, again! -- Daniele 2015-01-28 18:01 GMT+01:00 Robert B. Hanviriyapunt : > Daniele, > > If your components auto synchronize (true, by default),

Re: Webobjects-dev Digest, Vol 12, Issue 41

2015-01-28 Thread Theodore Petrosky
Johann Werner gave a presentation at WOWODC12 on Dynamic Elements titled “Dynamic Elements”. July 2, 2012 you may want to view this presentation. I think it is very clear! On Jan 28, 2015, at 12:01 PM, Robert B. Hanviriyapunt wrote: > Daniele, > > If your components auto synchronize (true,

Re: Webobjects-dev Digest, Vol 12, Issue 41

2015-01-28 Thread Robert B. Hanviriyapunt
Daniele, If your components auto synchronize (true, by default), then all you would need to do is add a binding. MyList.api - add mySelection binding (when bound, this will cause array to be pushed down to the subcomponent as well as pushed up from the subcomponent at various times in request-

Re: Getting Selected Values from Subcomponents

2015-01-28 Thread Amedeo Mantica
WODynamicElement are only java code, no .wo, but they have access to subcomponents public WODynamicElement(String aName, NSDictionary

Re: Getting Selected Values from Subcomponents

2015-01-28 Thread Daniele Corti
Hi Amedeo, thanks for the answer, but, sorry, I'm not sure to understand it. AFAIK, WODynamicElement is a simple HTML Element, not a component, so I cannot assign a .wo file to it (or am I wrong?). Anyway, I'm trying to change my example by moving the submit button on the SubComponent and using co

Re: Getting Selected Values from Subcomponents

2015-01-28 Thread Amedeo Mantica
The only way is to use a WODynamicElement as subcomponent instead of a WOComponent Sent from my iPhone > On 28/gen/2015, at 12:46, Daniele Corti wrote: > > Hi list, > I don't know if what I want to do is the best approach: > > I would like to create a Main Component Page that call a reusable

Getting Selected Values from Subcomponents

2015-01-28 Thread Daniele Corti
Hi list, I don't know if what I want to do is the best approach: I would like to create a Main Component Page that call a reusable SubComponent Example: MyPage.wo: My Page Do It! in the Subcomponent there is a List of Checkbox MyList.wo: