-
-
Save mikemix/4ce0dd29a7d66dc0b04df2db84b7cdf5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Cache(usage="READ_ONLY", region="append_only") | |
*/ | |
class User | |
{ | |
// … | |
/** | |
* @ORM\OneToMany(targetEntity=Post::class, mappedBy="author") | |
* @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="write_rare") | |
*/ | |
private Collection $posts; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment