Skip to content

Commit

Permalink
AnnotationDriver class is set as timeseries
Browse files Browse the repository at this point in the history
AnnotationDriver class is set as timeseries so that we avoid validator for timeseries. Timeseries doctrine#2533
  • Loading branch information
cyildirim committed Jul 3, 2023
1 parent 5e6e40d commit a66e407
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Doctrine/ODM/MongoDB/Mapping/Driver/AnnotationDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ public function loadMetadataForClass($className, \Doctrine\Persistence\Mapping\C

if (isset($documentAnnot->collection)) {
$metadata->setCollection($documentAnnot->collection);
if (is_array($documentAnnot->collection) && array_key_exists('timeseries', $documentAnnot->collection)) {
$metadata->isTimeSeriesDocument = true;
}
}

if (isset($documentAnnot->view)) {
Expand Down

0 comments on commit a66e407

Please sign in to comment.