ergo / ziggurat_foundations

Framework agnostic set of sqlalchemy classes that make building applications that require permissions an easy task.
BSD 3-Clause "New" or "Revised" License
71 stars 22 forks source link

obtain node resource by model name #70

Closed fmigneault closed 3 years ago

fmigneault commented 3 years ago

Because the ResourceTreeServicePostgreSQL can receive a custom model (as long as it implements same fields structure as Resource), it is possible to reuse this tree and all its useful methods for other similar tables.

I employ this in my repo to sync Resource (local) against RemoteResource that derives from Resource.

This fix retrieves the field by name of the model class instead of hardcoded auto0generated attribute named like default Resource model.

ergo commented 3 years ago

Thank you!

fmigneault commented 3 years ago

@ergo Will it be possible to have 0.8.4 in a near future? Thanks in advance.

ergo commented 3 years ago

@fmigneault I've made a new release for you along with some other changes.