-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with queries in the ifc structure at esent database #577
Comments
Hi @DialPawlowski , thank you for opening this thread. ESENT implementation is trying to be as lightweight as possible, so it doesn't keep references to objects. As a result, the actual object you got earlier and the one you are comparing have identical shape, but are fundamentally different objects with different object reference. At the same time, you use the interface to retrieve the data, but we can't override the equality operators for interfaces to handle this case. The solution is either to use entity caching of the IModel ( |
Thanks for your response. |
I'm sorry, I haven't used ESENT for a long time. Actually, we use an internal SQLite IModel implementation for most of the tasks at the moment. You can also rewrite your query to use the object equality operator this way: ifcStorey.Model.Instances
.Where<IIfcRelContainedInSpatialStructure>(relation=> relation.RelatingStructure.Equals(ifcStorey))
.SelectMany(subrel => subrel.RelatedElements); |
Hello.
I have a Problem after the update from Version 5.1.341 to 6.0.445. After the update I had a problem with an ifc file grater 100 MB.
Search function no longer returned any results with the ifc database in the esent database.
Here is an example for one search:
The comparison from relation.RelatingStructure and ifcStorey does not work in the new version. At this point, only Equals would work.
If I open the IFC in memory, the queries will work as usual. (ifcDatabaseSizeThreshHold -1)
Is there any Problem with the Esent Database? Looks like querying an object always returns a new instance.
Or is it normal that a IfcStorey has a new instance in the IIfcRelContainedInSpatialStructure.RelatingStructure property?
The text was updated successfully, but these errors were encountered: