Re: dynamically adding derived EOAttribute
Christian Pekeler <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
> EOAttribute countAtt = new EOAttribute();
> countAtt.setName("_derivedCount");
> countAtt.setDefinition("count(*)");
> countAtt.setExternalType("int");
> countAtt.setValueClassName("NSNumber");
> countAtt.setValueType("i");
> entity.addAttribute( countAtt );
Add the new attribute to the entity first before setting the definition.
Christian