Multiple Foriegn Keys


Author
Message
Kevin Lingofelter
Kevin Lingofelter
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: Forum Members
Posts: 77, Visits: 804
Hello,

I have a table with multiple foriegn keys. I'll use an Order table as an example:

OrderID
OrderDate
CustomerID
OrderStatusID
PaymentTypeID

So, in addition to the Order BO (I'll call this primary BO), I'll also have Customer, OrderStatus and PaymentType BOs (I'll call these secondary BOs).

Currently, this is what I'm doing to implement this:

In the primary BO, I have private instances of the secondary BOs, which are filled during the primary BO's instantiation. The primary BO has 5 custom properties:

CustomerCompany
CustomerFirstName
CustomerLastName
OrderStatus
PaymentType

In the get/set methods, I navigate to the proper secondary BO records and return/set the value of the results. 

Is this the best way to handle this?

Thanks!

Kevin

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