Is there a best way for solving this using Grails-
- Creating a "temporary" table based on multiple tables when user login (session created).
- It should be possible to access the "temporary" table from all controllers
- When http session ends, the temporary table should be dropped / truncated
- GORM features should be available
- Truncate all data and insert new when certain actions happen during an http session. (The data is dynamic)
I guess that this can be solved somehow by a Domain class. But I haven't succeeded with finding a good example.
The base of the data construction for the "temporary" table is very complex (performance) to generate and will be used often. And it is very important that the data only can be access by the owner (the user).