The new version released today has deleted all the Entities of two of my modules unfortunately.
Could you provide more details? What do you mean by modules? Did the entities disappear from Studio or on disk too? Can you attach the Studio log?
When can I get the log? I had restarted my computer later though.
It’s in ~/.haulmont/studio/logs/studio.log
Please find attached the log file.
Thank you, we’ll look into it.
Also, could you explain what happened? Did you open a project and didn’t see entities? What about entity java files in the global module?
Yes, I opened one of my app component projects and probably clean/assembled (not sure) then see there is no Entities in my project and deletion script generated. It happened to another project in the same way. I didn’t check the java file though and later restored my old backup, though really old…
Based on the information in the log we think the following has happened:
When Studio opened your project, it tried to load and unpack new sources of com.inteacc.ems.ic app component. At that moment an exception occurred because Studio couldn’t remove a temporary folder for some reason.
Due to the exception, the data model was not built properly, so Studio knew nothing about your project entities.
You didn’t pay attention to the exception in messages console and continued working with the project. When you generated DB scripts, Studio created DROP statements for tables because it didn’t see your entities.
I think this problem is hardly caused by the new Studio release and could happen on any previous version too. We will try to improve the handling of errors on project opening to avoid confusion in the future.
Thank you Konstantin, that may be the case. I received a message that it failed to remove… but was not aware that can be ending up with deleting files… Good to know this.
I’m sorry for the confusion, but Studio didn’t delete any files. It just couldn’t read the entities because of previous exception and thus didn’t show them in the UI.
BTW, if you don’t use a VCS with your project, at least turn on the Local History feature in Studio: Help > Settings > Keep local history of changes
A quote from the context help:
If the Keep local history of changes checkbox is selected, Studio saves current state of the project when it changes something, e.g. on saving entities or screens. Additionally, you can create history revisions by clicking on the bookmark button in the toolbar. The list of revisions with the ability to rollback to any revision can be opened from the recent projects list - see the button on the right side of the selected row. The local history repository is located in the .studio/local_history subdirectory of the project.
Thank you so much Konstantin. I just have turned that option on.
See the following issue in our bug tracker: