iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
601 stars 210 forks source link

Are EC schema the same / compatible with older ones? #5

Closed jan-slegr closed 5 years ago

jan-slegr commented 5 years ago

Hi,

when reading documenation EC schemas, I have not found any comparison or information about "compatibility" with existing EC schemas as used in V8i and CONNECT Edition products.

Questions that crossed my mind:

With regards,

Jan

ColinKerr commented 5 years ago

Hi Jan, The ECObjects specification between V8i/CONNECT Edition and iModel.js is different, the former uses ECObjects 2 and the latter uses ECObjects 3. The new specification adds some enhanced functionality, simplifies some areas where people made common mistakes and made it more friendly for database mapping. We have some internal documentation explaining what has changed, we will clean it up and publish it as part of iModel.js documentation.

The biggest difference between V8i/CONNECT Edition and iModel.js is that all schemas must derive from the BisCore base classes. These classes define how data is mapped to the SQLite tables and provide a common way to model data across domains (schemas) for different disciplines represented in the iModel. BisCore is documented in the BIS section of the iModel.js docs and we are actively working on improving that documentation.

You can access the BIS schemas as XML, if you have pulled and npm installed one of the samples you can find the schemas here: node_modules\@bentley\imodeljs-native-platform-api\lib\@bentley\imodeljs-n_8-win32-x64\addon\Assets\ECSchemas. We also have a JSON format for schemas which is much nicer to work with in JavaScript.

The new schema xml is compatible with the iModel Schema Editor (which will have a read only public beta release soon), but not the V8i Bentley Class Editor.

V8i/CONNECT Edition does not support ECObjects 3 but many ECObjects 2 schemas can be automatically converted to EC 3 and if combined with data in a Dgn file be automatically mapped on top of the BisCore schema. We use this ability to import Dgn data into an iModel, but this functionality is not exposed outside of the iModel Bridges.

We would be very interested in the use cases you are thinking of and feedback on our documentation.

Thanks for your input

jan-slegr commented 5 years ago

The new schema xml is compatible with the iModel Schema Editor (which will have a read only public beta release soon)

I downloaded Beta 2 and it looks nice! Will try this tool more later ;-)

ColinKerr commented 5 years ago

Jan, The description of what has changed between EC2 and EC3 made it out onto the public imodel.js documentation site. Check it out here: https://imodeljs.github.io/iModelJs-docs-output/bis/ec/differences-between-ec2-and-ec3/

Please let me know if you want more info. I will enhance the docs. If the current documentation is sufficient please close this issue.

ColinKerr commented 5 years ago

Closing, please reopen or create a new issue if you need more information.

Thanks