From: <hs...@us...> - 2011-12-09 15:00:30
|
Revision: 1001 http://treebase.svn.sourceforge.net/treebase/?rev=1001&view=rev Author: hshyket Date: 2011-12-09 15:00:21 +0000 (Fri, 09 Dec 2011) Log Message: ----------- Setting the study id for matrices on upload and setting the database creation script to have NOT NULL for the study id in the matrix table Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/service/study/SubmissionServiceImpl.java trunk/treebase-core/src/main/resources/TBASE2_POSTGRES_CREATION.sql Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/service/study/SubmissionServiceImpl.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/service/study/SubmissionServiceImpl.java 2011-12-08 22:15:08 UTC (rev 1000) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/service/study/SubmissionServiceImpl.java 2011-12-09 15:00:21 UTC (rev 1001) @@ -693,6 +693,9 @@ // Store matrice: getMatrixHome().persistAll(data.getMatrices()); + for (Matrix uploadMatrix : data.getMatrices()) { + uploadMatrix.setStudy(sub.getStudy()); + } sub.addMatrices(data.getMatrices()); getMatrixHome().flush(); Modified: trunk/treebase-core/src/main/resources/TBASE2_POSTGRES_CREATION.sql =================================================================== --- trunk/treebase-core/src/main/resources/TBASE2_POSTGRES_CREATION.sql 2011-12-08 22:15:08 UTC (rev 1000) +++ trunk/treebase-core/src/main/resources/TBASE2_POSTGRES_CREATION.sql 2011-12-09 15:00:21 UTC (rev 1001) @@ -526,7 +526,7 @@ casesensitive smallint, matrixdatatype_id bigint, matrixkind_id bigint, - study_id bigint, + study_id bigint NOT NULL, taxonlabelset_id bigint, ancstateset_id bigint, codonpositionset_id bigint, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |