Covariance in Operations, bug fix for large files and long id minimal fix

Hi Philipp,

as discussed:

- commit a17be6f simplifies the use of Operation via covariance,
- commit afb9443 fixes a small bug in the XML database reading (int versus long),
- commit f19f0d6 provides a minimalist fix for the long id problem (far from perfect).

Best regards,

Fabrice