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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.