We are using the Play! framework for HTTP sessions.
tenantId
and ipAddress
are columns that are common across multiple tables.
When the user is logged in, we are storing the tenantId
in HttpContextSession
Whenever we require the ip address of the user we are using Http.Context.current().request().remoteAddress()
to store the ip address.
We have huge set of queries written and now we want to save or query in a generic way for tenantId
.
All the queries goes via GenericDao
Can we use the following in GenericDao to get tenant Id so that we can append in all queries?
Http.Context.session().get("tenantId");
what would be the best approach to save or retrieve these details?
Thanks.
50
rep is not going to get you an answer to an off-topic/too broad/opinion based answer that will most likely get closed and probably deleted immediately after the bounty expires. – Clipper