Comments (8)
Ok so I investigated further and I'm not quite sure, whether we really have to change this behaviour, since simply changing the names that are initialized in the Faked Relationship did not destroy the tests for me. It might get relevant however, if the intersection entity is queried directly.
@jordimontana82:
I found out, that my queries fail, if I have Conditions in my link entities.
The lambda expression forms a condition like this:
Param_0.Attributes.ContainsKey("[IntersectionEntity].[ConditionField]")
So when I inspect the objects that the query includes before applying the lambda, I see, that the property with the name of the intersection entity is null.
I guess that the lambda targets this lookup field, so it might be necessary to fill it on associate, too.
Edit: So it seems that there might be even more handled incorrectly.
The Lambda Expression handles this as if it was a plain field in the query entities, e.g. it tries to get its value and to parse it as guid.
This field however is an enumerable, so even if we populated, the query would still be wrong...
from fake-xrm-easy.
Could you add a test method to reproduce this? I'll have a look whenever I have a chance :)
from fake-xrm-easy.
Hey @jordimontana82,
Thanks for your response.
I found the issue: Our code was doing natural joins, while FakeXrmEasy for now just processes inner and left outer joins. Other joins are just stepped over.
As a fix I added the natural join to the supported join statements, however it is currently processed like the inner join.
In addition to that, I thought it might be useful, if we throw exceptions on not supported join statements, so that issues can be found faster.
I'll send a PR.
Kind Regards,
DigitalFlow
from fake-xrm-easy.
Cool! 👍
Thanks a mill
from fake-xrm-easy.
My pleasure :)
Do you think the duplicate key exception when adding a relationship with identical attribute1 and attribute2 is an issue?
In my tests I just renamed the attributes that I added in the faked relationship.
As long as you don't want to directly query the intersect entity for those attributes, it should not be an issue, but if you do, than that's a problem.
I thought of prepending an "attr1" and "attr2" tag in front of the attribute names when creating the intersection entity record and prepending it for every request that targets the intersect entity, but not sure, if its worth the effort...
from fake-xrm-easy.
The only scenario I can think of might be for N:N self referential relationships maybe?
from fake-xrm-easy.
I think so. Should we then close this issue?
from fake-xrm-easy.
Yeah, let's close it and we can reopen if such scenario happens in future.
from fake-xrm-easy.
Related Issues (20)
- FindReflectedAttributeType Object reference not set to an instance of an object. HOT 20
- Min Date allowed in CRM is 01/01/1753 00:00:00, however fake xrm easy allows 01/01/0001 00:00:00 HOT 2
- Upsert create with alt key should copy to attribute HOT 1
- Fakecontext isn't updating after target change plugin executed HOT 1
- Query on associatedentitytypecode should work with both Entity Name and ObjectTypeCode HOT 5
- ConditionOperator.LessThan is throwing error "Specified Cast is not valid" for DateTimeField HOT 3
- NullReferenceException registering Plugin in simulated pipeline HOT 10
- RetrieveEntityDataSource is returning null value HOT 3
- Announcing public preview of FakeXrmEasy v2.x! HOT 1
- The specified service type is not supported when using Microsoft.Xrm.Sdk.PluginTelemetry. HOT 2
- Complex filter works in main entity, but not in nested entity.
- Is the Microsoft.PowerPlatform.Dataverse.Client supported? HOT 1
- ThisMonth in Query Expression fails on last day after midday
- ExecutePluginWith<T>(...) has no parameter for MessageName - need to use obselete method ExecutePluginWithTargetAndPreEntityImages<T>(...) HOT 2
- In Code Activity Logical Name does not exist HOT 1
- `type argument 'FakeXrmEasyUpdatePluginCrash.MyPlugin' violates the constraint of type parameter 'T'.` HOT 3
- Couldnt find reflected type for sdkmessageprocessingstepimage HOT 2
- ServiceClient not working with CrmServiceContext from Early Bound Generated Class HOT 2
- Object reference not set to an instance of an object.
- Filters with like condition throw 'Object reference not set to an instance of an object.'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fake-xrm-easy.