First I would like to report a problem with update/initial script generating and @MappedSuperclass and @Embeddable combination. I had a class that was @MappedSuperclass and included @Embeddable entity in itself. This embeddable contained ManyToOne associations to other entities. A little bit over-engineered maybe, but EclipseLink supports it alright. Whilst the update script generated was perfectly fine, the initial script was missing foreign keys corresponding to the associations that were part of the aforementioned @Embeddable class. We are trying to use Cuba for a new project and this problem manifested after deploying prototype to the server and showing it to the client - integrity has not been kept as it should have been - quite embarrassing.
That leads me to a question - why did you decide to have special script for clean DB and update script for already initialized DB? This creates massive redundancy of DDL/DML. It would work as well to have just update scripts and in case of initializing new DB, the whole series of these scripts would be run. This approach also gives you possibility - whenever you decide - to merge multiple update scripts into a new single one and thus simplify a state that is too complicated. We are actually using this approach on other projects without any issues. Also whole frameworks are written based on this approach. The problem is, that whenever you change your entities the initial scripts is recompiled and it is really hard to validate, if it is not missing anything - as it was in my scenario.
You may not agree what the right approach to this is, but what makes a good tool a good tool is an ability to tweak it, when it does not suffice. My last question is - if really don’t like this behavior, how can I extend Cuba studio to create update scripts in the way I am suggesting? There is lots of things I like about Cuba, so I hope there is a way to go around this and writing all my update scripts in hand is really not one acceptable ones, thanks for understanding.