Hello there, I must be missing something darn obvious, for my subEntityForEntity delegate method never gets called. My code looks like this:
=== class ModelGroupDelegate { EOEntity subEntityForEntity(EOEntity entity,NSDictionary dic) { println "&&&&&& fetching '$entity' $dic" null } } ... ... ... mdg.delegate=new ModelGroupDelegate() println "&&&&&& MY MDG DELEGATE: ${mdg.delegate()}" EOEntity rece=mdg.entityNamed('DBRecord') println "&&&&&& subentities of $rece.name: $rece.subEntities.count: $rece.subEntities.name" EOEntity rec2=mdg.entityNamed('DBRecord2') EOEntity rec3=mdg.entityNamed('DBRecord3') println "&&&&&& r2p($rec2.name) $rec2.parentEntity.name / r3p($rec3.name) $rec3.parentEntity.name" def fs=new EOFetchSpecification('DBRecord',null,null) fs.fetchLimit=10 // there's a LOT of records, limiting for test def got=new ERXEC().objectsWithFetchSpecification(fs) // should use subEntityForEntity, should it not?!? println "&&&&&& fetched $got.count objects all right in entities ${got*.entityName()}" System.exit(0) === and it never tries to call subEntityForEntity; instead, for whatever darned reason, it forces DBRecord3: === &&&&&& MY MDG DELEGATE: cz.ocs.model.ModelGroupDelegate@7db534f2 &&&&&& subentities of DBRecord: 2: [DBRecord3, DBRecord2] &&&&&& r2p(DBRecord2) DBRecord / r3p(DBRecord3) DBRecord &&&&&& fetched 10 objects all right in entities [DBRecord3, DBRecord3, DBRecord3, DBRecord3, DBRecord3, DBRecord3, DBRecord3, DBRecord3, DBRecord3, DBRecord3] APPLICATION SHUTDOWN SEQUENCE COMPLETE ==== Any idea what might I be doing wrong? Thanks a lot, OC _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com