Menu

OX7 - The oxfiles table uses wrong datatype on MySQL 8

2022-10-22
2022-10-26
  • Martin Smith

    Martin Smith - 2022-10-22

    This might be a known problem? I'm seeing the data column of oxfiles created as TINYBLOB type, when it should be LONGBLOB. Can be fixed by altering the table but would be good if it was created correctly.

     
  • Javier Paniza

    Javier Paniza - 2022-10-24

    Hi Martin:

    You're right, but the table creation is done by Hibernate so it's out of our jurisdiction. Keep in mind that the type depend on each database vendor.

    Indeed, in the documentation we say that you do your own CREATE TABLE using the most suitable database type.


    Help others in this forum as I help you.

     
  • Martin Smith

    Martin Smith - 2022-10-24

    Ah sorry.

    The documentation confused me. Where it says "We check that the type of DATA column is the most suitable type .." I thought that the "we" meant OpenXava. It might be clearer if it said that the user has to to do this.

    Might also be worth annotating the data field with @Length though I see conflicting reports about whether this works.

    Martin

     
  • Javier Paniza

    Javier Paniza - 2022-10-26

    Hi Martin:

    I thought that the "we" meant OpenXava

    No, in that case the documentation would say "OpenXava ...". "We" means "you". In documentation sometimes we use first person plural. Maybe we should use second person singular always.

    Note that in the previous sentence says "Note that we added <class>org.openxava.web.editors.AttachedFile</class>" where this is something to do by the programmer always, so the "we" meaning should be understanded by inertia.

    Anyways, we just learnt that "you" is better than "we", for the future documentation we write.

    Moreover, we have already fixed (though not published) your sentenced to:

    "You should check that..."


    Help others in this forum as I help you.

     

Log in to post a comment.