Replacement for Deprecated getGuid method

I'm doing an Core.retrieveXPathQuery in one of my java actions, this will return a list of List<imendixobject> objList. From the first object that is retrieved I need to use the id in a second Core.retrieveXpathQuery. When using the following: IMendixObject obj = objList.get(0); long objID = obj.getId().getGuid(); I'm getting the warning that the getGuid() method is deprecated. Can anyone help me in showing me the new way in which to get the same result, using the result from an xpath query to feed into a second xpath query without the use of getGuid()?
1 answers

Use the toLong()

Or use the community commons for building xPaths, for example

        XPath<EntityProxy> xPath = XPath.create(context, module.proxies.EntityProxy.class);
        xPath.eq(EntityProxy.MemberNames.EntityProxy_EntityProxy2, EntityProxy2.entityName, EntityProxy2.MemberNames.Name, NameString);
        List<EntityProxy> entityProxyList = xPath.all();