This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I was reading some of the comments for LS 3 and a user made the statement that eager load does not work with 1-1 relationships. Is this true? Lets say I have an order, that has many order details. The order details has a product (1-1). Would eager load work and load order details and product if I asked it to load the order (assuming I configured it correctly). Thanks. Joe Feser |
|
|
Hmm, looks like we have a bug here. Eager loading one-to-one relationships works if you start from the end that has the foreign key, but fails if you start from the other end. For example, suppose you have Car and Engine entities, with a one-to-one relationship between them where Engine has the CarId field. Then you can mark Engine.Car as eager load and load an Engine it will work, but if you mark Car.Engine as eager load, and load a Car, you get an error. Thus, in your case, your scenario will work if the relationship is specified by OrderDetail having a ProductId, but not if it is specified by Product having an OrderDetailId. This is *not* by design and we'll see if we can get it fixed. |
|
|
Okay, this should be fixed in the next nightly build. Let me know if you run into any problems. |
|