webmcp

view demo-app/app/main/_prefork/01-models.lua @ 543:a886e263b534

Bugfix regarding 1:1 relations: allow setting one class as primary class (needed to avoid endless recursion in foreign key lookups)
author jbe
date Sat Oct 19 18:55:24 2019 +0200 (2019-10-19)
parents 2169a62e12f5
children
line source
1 function mondelefant.class_prototype:by_id(id)
2 return self:new_selector()
3 :add_where{ "id = ?", id }
4 :optional_object_mode()
5 :exec()
6 end
7 execute.inner()

Impressum / About Us