one to one - Castle ActiveRecord OneToOne and JoinedBase/Key all together, No SQL Relations Created -


I want to prepare the following relationship.

  [Include] MasterForm {Guide MasterFormId {get; Set;} / * Some basic properties such as modified BI etc ... * [ActiveRecord] TerminationForm {[PrmaryKey (Foreign)] Guid MasterFormId {get; Setting;} / * Certain additional properties to finish * /} [ActiveRecord ("TermStaffing")] PublicService TermStaffing: StaffingBase, ITermStaffing {} Public Abstract Class StaffingBase: EntityBase & LT; StaffingBase>, IStaffingBase {Protected StaffingBase () {} Protected StaffingBase (string created) {This. Created by = made; } [Primary KEY (Primary KT Typ. Forison)] Public Virtual Guide MasterFormID {Received; Set; }}  

All of these main class succession ... base form and then creates certain variations .. surrenderform, another form ... etc ...

And then I was hanging some other form-sections as every child. I prepared those hair forms as [annonance]

Ie If the TerminationForm is consistent with FormOne .. I have the following "Staffing" .. this link .. and its reciprocal link (note ... I have also pulled some staffing properties in an abstract basis because I have TerminationStaffing and LeaveStaffing) [OneToOne (MapType = typeof (TermStaffing), Cascade = CascadeEnum.All, PropertyRef = "MasterFormId", ForeignKey = "FK_TerminationFormsStaffing", constrain = true)] Public Virtual ITermStaffing Staffing [OneToOne (MapType = typeof (TerminationForm), PropertyRef = "MasterFormId", Forei GKKey = "FK_StaffingTerminationForms", Constrain = true]] Public Virtual ITerminationForm TerminationForm

When AR schema builds it ... it is related to TerminationForm properly that through their primary key pause MasterForm To do ...

However, even if the TerminationStaffing table does not appear to include a MasterFormId relationship created by me. Should I worry about this? Maybe I can just add later, but I was surprised.

I thought about using [BelongsTo] TerminationStaffing but then what does the relationship goes into TerminationForm (one to one relationship is not one to many ..)

Am I away from the base?

It turns out that if you are constrained = true on the "child" side of a vonetine relationship This affects the order in which the records are inserted. Also, I believe that foreign key relationships can have an impact, which adds an AR to your database.

There is one thing to differentiate logical separation of a large data module which has less responsibility in the test.


Comments

Popular posts from this blog

MVP, design question -

excel - Populate list via a bi-Condition -

iphone - How do I make a UIPickerView in a UIActionSheet -