Data in be_Prop table #7642
Replies: 2 comments 7 replies
-
Is the transformer using? DgnDbStatus GeometryStreamIO::Import(GeometryStreamR dest, GeometryStreamCR source, DgnImportContext& importer) DgnImportContext has remap methods for all the ids that can be found in the geometry stream that need to be accounted for when copying between iModels. I see that DgnImportContext currently has the code to try to copy the line style information over commented out? DgnStyleId DgnImportContext::_RemapLineStyleId(DgnStyleId sourceId)
#if defined(NEEDSWORK_LINESTYLES) // importers are not tested so don't risk passing along bad data.
If you are calling this, you can see if it works with the NEEDSWORK_LINESTYLES removed, otherwise maybe looking at LineStyleElement::ImportLineStyle is helpful.
Was not someone's best idea. :) |
Beta Was this translation helpful? Give feedback.
-
Users of the iTwin.js public API should not directly access data in be_Props and our API should handle copying any necessary data if it does exist there. I created an issue: #7644 to track this bug. @diegoalexdiaz I think this discussion question also raises a good point about the data stored in be_Props. We would probably store less data there if we were starting over again, maybe some data should be exposed as part of the public API and we could do so via a view only schema so it can be queried with ECSql. |
Beta Was this translation helpful? Give feedback.
-
I recently bumped into some issues with LineStyles not displaying properly in iModels after exporting them from one iModel to another (imodel-transformer).
After further investigation I found out that the LineStyle elements are extended into the
be_Prop
sqlite table, i.e. the LineStyle element holds a reference to a row inbe_Prop
table, where the actual display information for the line style is stored.To do the export correctly I need to query all data related to a LineStyle and insert it into another iModel. That is where i found out that you cannot query information stored in
be_Prop
table using ECSql. TheLineStyleDefinition.Utils
(core-backend) class only contains methods for inserting the display information into thebe_Prop
table, but nothing for acquiring it.To manually query the data I would need to use specific names and namespaces (that are hardcoded in itwinjs code), infer the line style type from the type marked by an enum value on the LineStyle element, and then handle the data I receive because styles can reference other styles from within the
be_Prop
table.It can get confusing working with something like this because you are inserting data into an iModel which you cannot easily retrieve. Even more so if you are not the one who created the data and are only working with it and you are ignorant on the fact that this particular element is extended into some other DB table.
This already impacts things like:
imodel-transformer
where users are silently losing dataimodel-diff-tool
that is used for integrity checking and when comparing LineStyles false positives are produced because they appear to be identical when they actually might differ.An even worse thing is that when I was only looking at the line styles, there were additionally more that 50 other data types stored in the
be_Prop
table (in the iModel I was investigating) so I probably don't even know what data I am missing along with the line styles.Is there no better way of storing extended element data? Is there documentation somewhere on what is stored in
be_Prop
table, so that developers that are working with iModels can be aware of these edge cases?Beta Was this translation helpful? Give feedback.
All reactions