ONE TO ONE RELATIONSHIPS


Author
Message
Tim Dol
Tim Dol
StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I'm working with some legacy data that has two tables for customer information and I'm having a few problems. Perhaps I'm making this more difficult than it really is but I can't seem to get it to work like a 1:n relationship.

Example:  Table: Customer1 - Customer Code(Char(12),PK), Customer Name, Address...

              Table: Customer2 - Customer Code (Char(12),PK), Main Contact, Phone, Email

Note: PrimaryKeyIsAutoIncremental = False

I created two business objects. I set the ParentRelationShip on Customer2.

Questions:

1) How Do I handle Child Dialogs where I have two or more business objects to populate. My child dialog contains two BO's and the fields are mapped to both tables on the childformdialog.  On the parent form I added Customer1.Add() and Customer2.Add() before launching the childform.  When I save the childform, the data in Customer2 does not save.  Customer1 is fine. (Note, I also set the parent Business Object property on Customer2 on the parent form)

2) When Editing, I seek to the selected primary key on customer1 before launching the child form. Do I need to fill the Customer2 BO as well at this point or do this on the child form, which relates to question 3.

3) The Primary business object on the child form is Customer1. How do I retrieve the related data from Customer2 when navigating the BO?

4) With respect to Foreign Key Management and Auto Child Record Filtering, as described in the docs - Are these features supported with one to one relationships and if the PrimaryKeyIsAutoIncremental = False?

Thanks

Tim

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search