Skip to content

Commit be19425

Browse files
author
Holger Lösken
committed
Explicitly define the properties to be searchable
Circular reference occurring out of nowhere :(
1 parent 6eee921 commit be19425

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tests/Entity/Comment.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace MeiliSearch\Bundle\Test\Entity;
66

7-
use DateTime;
87
use Doctrine\ORM\Mapping as ORM;
8+
use Symfony\Component\Serializer\Annotation\Groups;
99

1010
/**
1111
* @ORM\Entity
@@ -17,6 +17,7 @@ class Comment
1717
* @ORM\Id
1818
* @ORM\GeneratedValue
1919
* @ORM\Column(type="integer", nullable=true)
20+
* @Groups({"searchable"})
2021
*/
2122
private ?int $id = null;
2223

@@ -34,12 +35,14 @@ class Comment
3435
* max=10000,
3536
* maxMessage="comment.too_long"
3637
* )
38+
* @Groups({"searchable"})
3739
*/
3840
private $content;
3941

4042
/**
4143
* @var \DateTime
4244
* @ORM\Column(type="datetime")
45+
* @Groups({"searchable"})
4346
*/
4447
private $publishedAt;
4548

tests/Entity/Post.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ class Post
3232

3333
/**
3434
* @ORM\Column(type="text", nullable=true)
35+
* @Groups({"searchable"})
3536
*/
3637
private ?string $content = null;
3738

3839
/**
3940
* @ORM\Column(type="datetime")
41+
* @Groups({"searchable"})
4042
*/
4143
private ?\DateTime $publishedAt = null;
4244

0 commit comments

Comments
 (0)