Open basejump opened 12 years ago
Since the plugin uses the current tenant in all queries, the tenant value must have a "plain" way to save it in one database field. So, if we want to use an object as tenant representation, we should have a simple way to 'serialize' it and bring it back. Probably the tenant object should implement an interface with kind of marshal() and unmarshal() methods, or kind of that. Right? Then, when modifying the query in the database, the plugin would add the 'serialized tenant way'.
Don't know if I made myself clear :)
when you say tenant object , what do you mean? also for the filter its setup as follows multiTenantHibernateFilter(FilterDefinitionFactoryBean) { defaultFilterCondition = ":tenantId = $tenantColumnName" parameterTypes = [ tenantId: "java.lang.Integer" ] } we can make the type config come from the config.
externalizing this config, to come from the config would be fine. we could use strings or other field types with no problems.
currently we are locked into integer. a. grails uses long as default for id's b. we are also looking at using a UUID as an option right now too.
Does anyone foresee an issue with this? CurrentTenant.get would return and object now instead.