Open grantfitzsimmons opened 4 weeks ago
The first COJO CO will automatically have isPrimary set to True when the COG type is 'consolidated'
First COJO CO by order of entry or first COJO CO determined by the precedence
field?
First in the order of entry
With the introduction of Collection Object Groups (COGs), we added two new fields in the
CollectionObjectGroupJoin
(COJO) table:isPrimary
: Represents only the important CO in a COGisSubstrate
: Represents the CO in a COG that acts as the substrate for the other COG childrenBusiness Logic:
isPrimary
andisSubstrate
can only be set toTrue
for a single CO.isPrimary
orisSubstrate
fields.IsPrimary
is set toTrue
for one CO in a COG. All other COJO records will haveIsPrimary
set toFalse
.IsPrimary
set toTrue
, it isNULL
for all COJO records in the COG.isPrimary
set toTrue
when the COG type is 'consolidated'Behavior
Users should be able to count the number of physical specimens in their collection by searching:
Base Table: Collection Object Query Line: Collection Object --> COJO -->
IsPrimary
=True
orNULL
This should return all Collection Objects that are members of a COG where they are the primary CO or COs that are not members of a COG