Ok, my mistake. What did I called register was the row value of the table. Taxonomy misplacing.
Well, the problem looks like this:
I have one table Person:
Code:
CREATE TABLE Person
(
PERSONID INT NOT NULL,
NAME VARCHAR(40) NOT NULL
)
and two other tables:
Code:
CREATE TABLE Client
(
PERSONID INT NOT NULL,
GROUPID INT NOT NULL
)
CREATE TABLE Manufacturer
(
PERSONID INT NOT NULL,
NUM_PRODS_MAN INT
)
Now, to implement this scenario using NHibernate, the best way is using table-per-subclass mapping, right? OK. Well, the table per subclass strategie uses a 1 to 1 relationship, which means that when I'm inserting an object Manufacturer I'm inserting in the database, at same time, a row into the both tables, Person and Manufacturer.
Ok, now considering this, let's try to insert an object Client into the database, the framework reacts in the same way, inserting another row in the Person table and a new row in the Client table, that' right?
Well, the problem is that my Client and Manufacturer tables are just a complement for the table Person and the Person can be, in my relational model, one Client AND one Manufacturer, which means that this row inserted while inserting the Client is undesirable.
What can I do to solve this, I do not want to insert this second row in the table Person and, instead of it, the framework NHibernate MUST UPDATE the data of the previous row inserted into the table Person.
Please, help me and thanks a lot.