From: David L. <dle...@co...> - 2010-10-28 19:14:38
|
On 2010-10-28, at 3:10 PM, David Holt wrote: > Thanks David. You're right. The offending code has been replaced by: > > #if ($entity.parentSet) > public static ERXFetchSpecification<${entity.classNameWithOptionalPackage}> fetchSpecFor${entity.name}() { > return new ERXFetchSpecification<${entity.classNameWithOptionalPackage}>(${entity.prefixClassNameWithoutPackage}.ENTITY_NAME, null, null, false, true, null); > } > #else > public static ERXFetchSpecification<${entity.classNameWithOptionalPackage}> fetchSpec() { > return new ERXFetchSpecification<${entity.classNameWithOptionalPackage}>(${entity.prefixClassNameWithoutPackage}.ENTITY_NAME, null, null, false, true, null); > } > #end > Yeah, I know :-) > > On 2010-10-27, at 5:40 PM, David LeBer wrote: > >> >> On 2010-10-27, at 7:19 PM, David Holt wrote: >> >>> Hi all, >>> >>> I might be doing something wrong, but when I eogenerate, my subclasses have errors in their fetchspec() methods. >>> >>> This is the relevant section in the Velocity template: >>> >>> public static ERXFetchSpecification<${entity.classNameWithOptionalPackage}> fetchSpec() { >>> return new ERXFetchSpecification<${entity.classNameWithOptionalPackage}>(${entity.prefixClassNameWithoutPackage}.ENTITY_NAME, null, null, false, true, null); >>> } >>> >>> This results in the following in the subclass >>> >>> public static ERXFetchSpecification<SubEntity> fetchSpec() { >>> return new ERXFetchSpecification<SubEntity >(_SubEntity.ENTITY_NAME, null, null, false, true, null); >>> } >>> >>> ThisAnd Eclipse has an error that reads "The return type is incompatible with _SuperEntity.fetchspec()" >>> >>> Is there anything I could do about this? Or should I just comment out this part of the template? >>> >>> David >> >> I think that's an old template. Subclassed entities should get a fetchSpecForSubClass() method. >> >> ;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 >> twitter: http://twitter.com/rebeld >> -- >> Toronto Area Cocoa / WebObjects developers group: >> http://tacow.org >> >> >> >> > ;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 twitter: http://twitter.com/rebeld -- Toronto Area Cocoa / WebObjects developers group: http://tacow.org |