Hi, In one of my multi tenant application, we need to use multiple Postgresql schema. We love datamapper. Its much cleaner way to talk to database. However, I believe currently postgresql adapter does not support schema out of the box. I saw a patch by Sam that allows me to use schema by specifying that in model's storage_name and overriding quote_name method of AbstractAdapter. However, that approach dont serve our purpose as in our case, same model/table exist in mutliple schema (based on the tenant) + specifying schema name in every model does not look very DRY.
Ideally, it will be great to supply schema_name as an additional option to the repository (like schema_search_path in active_record postgresql adapter). Are there plans to build this support out of the box. I am currently exploring making changes through resource_naming_convention. However, I see some SQL statements in the log where 'public' schema is present. If anyone can suggest a better approach I can work on the patch. Thanks for making such an elegant orm. Regards Bhavin -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
