specify / specify6

Source Code for Specify 6, Biological Collections Management Platform
https://specifysoftware.org
GNU General Public License v2.0
14 stars 6 forks source link

Cannot use Data Exporter when a mapping returns records with no version information #1235

Open grantfitzsimmons opened 8 months ago

grantfitzsimmons commented 8 months ago

Whenever I attempted to Build / Update a schema mapping that included Accessions, it would fail. A dialog would show this:

java.util.concurrent.ExecutionException: org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of edu.ku.brc.specify.datamodel.DataModelObjBase.version

I fixed this by using this SQL command (specific to this case):

UPDATE accession SET `Version` = 0 WHERE Version IS NULL;

It should be able to handle these instances.