Flow doesn’t expose the technical identifier of entities by default as it is generally only for internal use. There are still times you want to get hold of it and there are several ways to do that:
Inject yourself the PersistenceManager \TYPO3\Flow\Persistence\PersistenceManagerInterface which then can give you the identifier:
Or, if the identifier of your objects happens to be an important part of your domain logic, you should make it explicit in your models by creating the specific @ORM\Id properties and creating a proper getter for it.