S
Simon
Hi everyone,
I'm having a really weird problem. I'm sure its my fault and that I'm just
being stupid but here goes. I hope someone can help:
I have a collection class called RolesCollection. Which as you might expect
holds Role objects.
Instantiating the RolesCollection class calls some db code and the
RolesCollection becomes pupulated with roles according to the userid you
pass into the constructor.
The Role objects contain an id, name and description that are all set in the
constructor when the Role class is instantiated.
This is all good so far. The problem that is baffling me is:
The Role class also has a PermissionsCollection that ISNT set in the
constructor. However, immediately after setting up a role, the
PermissionsCollection is instantiated based on what the Debugger tells me.
Does anyone know how or why this variable is getting instantiated? At the
top of the class I'm declaring it to be null and I havent got any
initialising code for the PermissionsCollection class yet.
It's weird.
Thanks all
I'm having a really weird problem. I'm sure its my fault and that I'm just
being stupid but here goes. I hope someone can help:
I have a collection class called RolesCollection. Which as you might expect
holds Role objects.
Instantiating the RolesCollection class calls some db code and the
RolesCollection becomes pupulated with roles according to the userid you
pass into the constructor.
The Role objects contain an id, name and description that are all set in the
constructor when the Role class is instantiated.
This is all good so far. The problem that is baffling me is:
The Role class also has a PermissionsCollection that ISNT set in the
constructor. However, immediately after setting up a role, the
PermissionsCollection is instantiated based on what the Debugger tells me.
Does anyone know how or why this variable is getting instantiated? At the
top of the class I'm declaring it to be null and I havent got any
initialising code for the PermissionsCollection class yet.
It's weird.
Thanks all