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
|
Hello, I'm getting the following exception when trying to create an entity, Adjustment, in a test. Adjustment doesn't participate in inheritance.
The solution is rather large and I'm unable to send it. I tried to isolate it in a console application, but I'm unable to do so. Here is Adjustment:
Currency is just another entity representing the currency in which the adjustment is made. I have several entities for which this exception is thrown. None of them participate in inheritance. Any help would be appreciated. Thanks, Werner |
|
|
Hmm, this is a 'can't happen' error and without a repro it's hard to know what's causing it. The Adjustment class itself is not (necessarily) the problem -- the error is that internally we have mistaken Do you have a source code licence? If so, if you build against the source code in Debug mode, you will get a Debug.Assert at a more useful location, and can look up the stack to see what type was being processed when the error occurred. If not, could you post the stack trace of the exception and we will see if that sheds any light on the error -- if nothing else it will at least help to guide us if we need to make a diagnostic build for you. Thanks! |
|
|
Hi Ivan, No, I don't have the source code license. Unfortunately I have reverted back to an older build (4.0.811.18502) of LightSpeed. The issue doesn't reproduce with build 4.0.811.18502, however there are several defects that were fixed in newer builds. I have a hard deadline for next week and have spent a majority of my time diagnosing LightSpeed issues rather than working on business related stuff. I'm a tad concerned about the quality of the nightly builds. Thanks, Werner |
|
|
Hi Ivan, I looked through my older test runs and found a stacktrace that may be of use:
Here is the message for that exception:
Again, PeopleOrganizations do not participate in any inheritance, but joins People and Organizations in a many to many relationship. PeopleOrganizations has no relationship with PartyType and belongs to a different model. I hope this helps Thanks, Werner PS I would like to suggest that LightSpeed logs to a trace source, so I can send you the logs in the future. Some issues I have found are rather hard to reproduce in isolation. |
|
|
Thanks for the extra info. This error occurs if you have DiscriminatorAttribute on the base class of a hierarchy, i.e. a class that inherits directly from
This attribute is not used on root classes because anything that doesn't match a derived class discriminator will be mapped to the base class anyway. Note that the class reported in the error message will NOT be the class with the unwanted DiscriminatorAttribute -- it will be some other class that gets picked up while we incorrectly try to process the root class discriminator. Obviously however this should not cause an error and we will ship a fix in the next nightly build. In the meantime, remove DiscriminatorAttribute from the base class of the PartyType hierarchy and you should be good to go. |
|
|
Hi Ivan, Thanks that suggestion worked on the lastest nightly build. Werner |
|