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
|
Hi, I have encountered a problem when I query for a class that has descendants more than two levels down. What is being returned is just the class in question and it's direct children. It seems to be an issue with BuildDiscriminatorCriteria in TypeModel, if you look at the foreach loop it just calling CreateDiscriminatorCriteria on the child TypeModels when it really should be recursively calling BuildDiscriminatorCriteria. Thanks again, Kavan |
|
|
Expanding on this a bit, I am also having an issue with a self refering association within a hierachy. The hierachy is like so: SKUBase PricedSKU, SKUSegmentDef SKUService, SKUProduct SKUSegment With SKUSegment refering to SKUSegmentDef. The query generator bombs when trying to return the EntityCollection of SKUSegment objects in SKUSegmentDef The query generated looks like: SELECT [iv_SKU_Base] .[Id],[iv_SKU_Base] .[ED],[iv_SKU_Base] .[CreatedOn],[iv_SKU_Base] .[DeletedOn],[iv_SKU_Base] .[LockVersion],[iv_SKU_Base] .[Prefs],[iv_SKU_Base] .[UpdatedOn],[iv_SKU_Base] .[CategoryId],[iv_SKU_Base] .[Class],[iv_SKU_Base] .[Code],[iv_SKU_Base] .[Description],[iv_SKU_Base] .[Name],[iv_SKU_Base] .[Price],[iv_SKU_Base] .[Serialization],[iv_SKU_Base] .[DefinationId],[iv_SKU_Base] .[ItemCount],[iv_SKU_Base] .[SegmentUnit]FROM [iv_SKU_Base] WHERE ((([iv_SKU_Base].[DefinationId] = '9add98aa-6448-4d26-ba74-1f2656eb5482' AND EXISTS ( SELECT[iv_SKU_Base] .* FROM[iv_SKU_Base] WHERE[iv_SKU_Base] .[Id] = [iv_SKU_Base].[DefinationId] AND[iv_SKU_Base].[Class] = 5000 )) AND EXISTS ( SELECT[iv_SKU_Base] .* FROM[iv_SKU_Base] WHERE[iv_SKU_Base] .[Id] = [iv_SKU_Base].[DefinationId] AND[iv_SKU_Base] .[DeletedOn] IS NULL )) AND [iv_SKU_Base].[DeletedOn] IS NULL);
Obviously in the where clause the two sub-select are not necessary. Thanks in advance, Kavan |
|