Hello there,
i want to know if sqlalchemy has some problems querying a view? Because if i query the view with normal sql on the server like:
select * from ViewMyTable where index1 = '608_56_56';
i get a hole butch of entries.
But with SQLAlchemy i get only the first one. But in the count is the correct number. I have no idea why.
This is my SQLAlchemy code.
myQuery = Session.query(ViewMyTable)
erg = myQuery.filter(ViewMyTable.index1 == index1.strip())
totalCount = erg.count() # contains the correct number of all entries i found with that query.
ergListe = erg.all() # contains only the first entry i found with my query.
Somebody could help me out here please?
Kind regards, Nico