This discussion is archived
8 Replies Latest reply: Jan 18, 2013 5:01 AM by AndreyN RSS

how to change EntityObject source at runtime

AndreyN Pro
Currently Being Moderated
Hi, Happy new year!

We have the following in the project
1. Created at design time table-based EntityObject EO
2. Crated on basis of EO ViewOject VO

We would like to have
1. If user User1 login to the application then EO will use table TAB1
2. If user User2 login to the application then EO will use table TAB2

where TAB1 and TAB2 have same structure.

The problem is that EO by default is shared accross the all application modules i.e. one EO instance per application, and EO.setSource in one session influence to other sessions.

At this moment we have overriden method getSource of EntityDefImpl and based on session parameter, we return different sources

Has anyone done something like this?


  • Correct Answers - 10 points
  • Helpful Answers - 5 points