def getOnlyFields(self, pk, fields, cascadeFetch=False):
conn = self._get_connection()<EOL>key = self._get_key_for_id(pk)<EOL>res = conn.hmget(key, fields)<EOL>if type(res) != list or not len(res):<EOL><INDENT>return None<EOL><DEDENT>objDict = {}<EOL>numFields = len(fields)<EOL>i = <NUM_LIT:0><EOL>anyNotNone = False<EOL>while i < numFields:<EOL><INDENT>objDict[fields[i]] = res[i]<EOL>if res[i] != None:<EOL><INDENT>anyNotNone = True<EOL><DEDENT>i += <NUM_LIT:1><EOL><DEDENT>if anyNotNone is False:<EOL><INDENT>return None<EOL><DEDENT>objDict['<STR_LIT>'] = pk<EOL>ret = self._redisResultToObj(objDict)<EOL>if cascadeFetch is True:<EOL><INDENT>self._doCascadeFetch(ret)<EOL><DEDENT>return ret<EOL>
getOnlyFields - Gets only certain fields from a paticular primary key. For working on entire filter set, see allOnlyFields

@param pk <int> - Primary Key

@param fields list<str> - List of fields

@param cascadeFetch <bool> Default False, If True, all Foreign objects associated with this model
   will be fetched immediately. If False, foreign objects will be fetched on-access.


return - Partial objects with only fields applied