I trying to set a sequential number based on a foreign key. See this sample:
Code:
Table of ClassA
________________________
| Id | Description |
|----|-----------------|
| 1 | xxxx |
| 2 | xxxxxx |
------------------------
Table of ClassB
_______________________
| ClassA_ID | Sequence |
|-----------|----------|
| 1 | 1 |
| 1 | 2 |
| 1 | 3 |
| 1 | 4 |
| 2 | 1 |
| 2 | 2 |
| 2 | 3 |
| 2 | 4 |
------------------------
How the best way to do this? Using interceptor or using custom generator class? Any sample?
Thanks in advance..