dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 377 forks source link

Model method only works once with caching enabled (PSQL) #558

Closed jonahwh closed 9 years ago

jonahwh commented 9 years ago

Node: v0.10.30 Driver: psql orm: v2.1.19

I have a method defined on a model. The first time I retreive this model after running the server, node can successfully call the method on this model. If I reload the page, node crashes, because the returned model has the method set to undefined instead of a function.

If I disable caching globally, the issue stops occurring, and it runs as intended.