Hello Peter,

what kind of problems did you have with the users.xml and the other backup files?

I changed the backup function 'getBackupRooms' in the source file Rooms.java for 2.1.1 like Maxim did it for OM 3.0.2+ [1] into:

@NamedQuery(name = "getBackupRooms", query = "SELECT r FROM Room r LEFT JOIN FETCH r.moderators ORDER BY r.rooms_id"),

Now the upgrade - backup and the reinstall - of OM works as expected for me.

Or should I change something else?

Links: [1] https://svn.apache.org/repos/asf/openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/entity/room/Room.java

Thanks & Greetings,
Michael

Am 5.5.2014 11:07, schrieb Peter Dähn:
Hi Michael,

we had also problems with user.xml and a few other files... maybe you
should have a look at the other files too...

rooms should just be deleted over the admin interface. Then the rooms
will just be marked as deleted and remain in the database. Then the
right order will be kept. You run into problems, if you delete something
in the database.

Greetings Peter


Am 05.05.2014 10:52, schrieb Michael Wuttke:
Hello Peter,

Am 05.05.2014 09:42, schrieb Peter Dähn:
sorry.. was out of office... ;-)
no problem. No wonder with so many public holidays. ;-)

We added an orderby to the export functions of the backup-procedure and make another backup... but we used OM 2.0... so... you need to find the used functions and add to the sql queries an orderby-part by youtrself...
Therefor you need to change some source-files an recompile om...
Maxim suggested it yesterday too:
The easiest way is to correct 2.1.1 sources and add ORDER BY:


https://svn.apache.org/repos/asf/openmeetings/branches/2.x/src/org/apache/openmeetings/persistence/beans/room/Room.java

To this line:
@NamedQuery(name = "getBackupRooms", query = "SELECT r FROM Room r
LEFT JOIN FETCH r.moderators WHERE r.deleted = false "),

But with mysql the order shoulb be fine.. as far as I remember... it was
just an issue with postgres... Are the id's mixed in your rooms.xml?
Yes the id's of the rooms.xml export file are mixed.

I'm curious about, what will be happen with the deleted rooms. Maybe
they will be skipped and the id's might change as well.

After the next upgrade test I can tell more about it. ;-)

Thank you & Greetings,
Michael


Reply via email to