Mike,
Thanks a lot indeed! I just checked this with tonight's build and it
works like a charm! Velogen now does everything the old eogen did for
me and more, thanks to the model documentation feature. Very, very cool!
cheers,
Fabian
Am 24.01.2008 um 20:40 schrieb David LeBer:
>
> On 24-Jan-08, at 12:58 PM, Mike Schrag wrote:
>
>> It worked for very small values of "working" ... Um yeah I'm not
>> sure how that ever worked, but I know under certain cases it DID.
>> Anyyyyhooo ... The "actually working" version is now committed, and
>> I added a shortcut on EOQualifierBinding that you can just
>> call .javaClassName on it directly rather than
>> attributePath.javaClassName.
>
>
> Hoorah!
>
> As of WOLips 3.3.4778 this chunk of velogen template:
>
> #foreach ($fetchSpec in $entity.sortedFetchSpecs)
> public static NSArray fetch${fetchSpec.capitalizedName}
> (EOEditingContext ec#foreach ($binding in
> $fetchSpec.distinctBindings), ${binding.javaClassName} $
> {binding.name}Binding#end) {
> #if ($fetchSpec.distinctBindings.size() > 0)
> NSMutableDictionary bindings = new NSMutableDictionary();
> #foreach ($binding in $fetchSpec.distinctBindings)
> if (${binding.name}Binding != null) {
> bindings.setObjectForKey(${binding.name}Binding, "$
> {binding.name}");
> }
> #end
> #end
> return EOUtilities.objectsWithFetchSpecificationAndBindings(ec, "$
> {entity.name}", "${fetchSpec.name}", #if
> ($fetchSpec.distinctBindings.size() > 0) bindings);#else null);
> #end
>
> }
> #end
>
> With the qualifiers:
>
> (userName = $userName) and (password = $password)
>
> Generates this:
>
> public static NSArray
> fetchUserForUsernameAndPassword(EOEditingContext ec, String
> passwordBinding, String userNameBinding) {
> NSMutableDictionary bindings = new NSMutableDictionary();
> if (passwordBinding != null) {
> bindings.setObjectForKey(passwordBinding, "password");
> }
> if (userNameBinding != null) {
> bindings.setObjectForKey(userNameBinding, "userName");
> }
> return EOUtilities.objectsWithFetchSpecificationAndBindings(ec,
> "User", "UserForUsernameAndPassword", bindings);
> }
>
> Very happy! Thanks a tonne Mike!
>
> ;david
>
> --
> David LeBer
> Codeferous Software
> 'co-def-er-ous' adj. Literally 'code-bearing'
> site: http://codeferous.com
> blog: http://davidleber.net
> profile: http://www.linkedin.com/in/davidleber
> --
> Toronto Area Cocoa / WebObjects developers group:
> http://tacow.org
>
>
This archive was generated by hypermail 2.0.0 : Fri Jan 25 2008 - 05:24:29 EST