Results 1 to 25 of 274
Nov 11, 2004, 11:03 #14
- Join Date
- Jul 2004
- Canada, Qc
- 0 Post(s)
- 0 Thread(s)
2. A question Tony.
Is an User and a List of User the same thing?
I do not say to do separate object for all, but *conceptually* a User is an User and a List of user will be a kind of list. There was some person who give some "rule" (best practice?) for concept like inheritance and it says something that the child is a kind-of parent. It was very clever from what I think of it. I believe that you use that anyway. You modelize a Table and do a KindOfTable (might be an answer for your sceptic).
Also how flexible is your approach?
Ex1: An User having a list of addresses.
Ex2: We Delete Object A, which has instruction to Delete its child (therefore all B) but when wanting to delete B, B has a constraint that you cannot delete its child.
Ex3: Same as Ex2 but when deleting B, B should delete in cascade.
listOfB : B
list of C : C
The way you have done this, I believe you called directly DELETE from TABLE where... (for the relationship)...
But then if there is a 3rd level of relationship, your generated query won't work. I guess like any framework we have limitation and exception... I have looked just last night and I hope I don't get it wrong about the behavior of the example you shown.
but if A.delete() delete all its relationship first, like:
foreach (listOfB as b) b.delete
and b.delete delete relationship, etc.
Are not we making it more secure...
Of course you like to do all the developpement by yourself, therefore you will probably adapt your solution for this, but feel free to answer me about the way you did your database_table how that situation will be handled.
I'm pretty curious... I like a lot of the idea you give... I read some article and I am sure we can discuss for decade about them ;-) I will try to focus on those points for now.