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.