-
-
Notifications
You must be signed in to change notification settings - Fork 80
Description
I have to compare measurement information form two a2l.
I read the first a2l
session = db.import_a2l(a2l_old)
project = Project(session)
module = project.module[0]
… , read some ecu-addresses from measurements (result ok),
then I close the session
session.close()
after reading a second a2l
session = db.import_a2l(a2l_new)
project = Project(session)
module = project.module[0]
I read the addresses from the same measurements again with:
found = next(module.measurement.query(lambda row: row.name == name), None)
But the returned addresses are the addresses from the first read a2l_old instead of these from the actual loaded a2l_new.
After a short inspection, Project build up a cache when reading the first a2l. During the request of addresses after reading the second a2l, Project returns the addresses from cache instead of these from session.