1818
1919namespace OpenConext \EngineBlock \Metadata \Entity ;
2020
21- use DateTime ;
2221use Doctrine \ORM \Mapping as ORM ;
2322use OpenConext \EngineBlock \Metadata \Coins ;
2423use OpenConext \EngineBlock \Metadata \ContactPerson ;
2827use OpenConext \EngineBlock \Metadata \Organization ;
2928use OpenConext \EngineBlock \Metadata \Service ;
3029use OpenConext \EngineBlock \Metadata \X509 \X509Certificate ;
30+ use OpenConext \EngineBlockBundle \Doctrine \Type \SerializedArrayType ;
31+ use OpenConext \EngineBlockBundle \Doctrine \Type \SerializedObjectType ;
3132use RuntimeException ;
3233use SAML2 \Constants ;
3334
3435/**
3536 * Abstract base class for configuration entities.
3637 *
38+ * Note: This baseclass is extended by IdentityProvider and ServiceProvider. Both entities are stored in a single table.
39+ * This means all columns defined in both subclasses are nullable by default, even if you pass 'nullable: false'.
40+ *
3741 * @package OpenConext\EngineBlock\Metadata\Entity
3842 * @SuppressWarnings(PHPMD.TooManyFields)
3943 *
@@ -134,25 +138,25 @@ abstract class AbstractRole
134138 * @var Logo
135139 * @deprecated Will be removed in favour of using the Mdui value object, use the getter for this field instead
136140 */
137- #[ORM \Column(name: 'logo ' , type: \ Doctrine \ DBAL \ Types \Types:: OBJECT )]
141+ #[ORM \Column(name: 'logo ' , type: SerializedObjectType:: NAME )]
138142 public $ logo ;
139143
140144 /**
141145 * @var Organization
142146 */
143- #[ORM \Column(name: 'organization_nl_name ' , type: \ Doctrine \ DBAL \ Types \Types:: OBJECT , nullable: true , length: 65535 )]
147+ #[ORM \Column(name: 'organization_nl_name ' , type: SerializedObjectType:: NAME , length: 65535 , nullable: true )]
144148 public $ organizationNl ;
145149
146150 /**
147151 * @var Organization
148152 */
149- #[ORM \Column(name: 'organization_en_name ' , type: \ Doctrine \ DBAL \ Types \Types:: OBJECT , nullable: true , length: 65535 )]
153+ #[ORM \Column(name: 'organization_en_name ' , type: SerializedObjectType:: NAME , length: 65535 , nullable: true )]
150154 public $ organizationEn ;
151155
152156 /**
153157 * @var Organization
154158 */
155- #[ORM \Column(name: 'organization_pt_name ' , type: \ Doctrine \ DBAL \ Types \Types:: OBJECT , nullable: true , length: 65535 )]
159+ #[ORM \Column(name: 'organization_pt_name ' , type: SerializedObjectType:: NAME , length: 65535 , nullable: true )]
156160 public $ organizationPt ;
157161
158162 /**
@@ -179,7 +183,7 @@ abstract class AbstractRole
179183 /**
180184 * @var X509Certificate[]
181185 */
182- #[ORM \Column(name: 'certificates ' , type: \ Doctrine \ DBAL \ Types \Types:: ARRAY , length: 65535 )]
186+ #[ORM \Column(name: 'certificates ' , type: SerializedArrayType:: NAME , length: 65535 )]
183187 public $ certificates = array ();
184188
185189 /**
@@ -191,7 +195,7 @@ abstract class AbstractRole
191195 /**
192196 * @var ContactPerson[]
193197 */
194- #[ORM \Column(name: 'contact_persons ' , type: \ Doctrine \ DBAL \ Types \Types:: ARRAY , length: 65535 )]
198+ #[ORM \Column(name: 'contact_persons ' , type: SerializedArrayType:: NAME , length: 65535 )]
195199 public $ contactPersons ;
196200
197201 /**
@@ -203,13 +207,13 @@ abstract class AbstractRole
203207 /**
204208 * @var string[]
205209 */
206- #[ORM \Column(name: 'name_id_formats ' , type: \ Doctrine \ DBAL \ Types \Types:: ARRAY , length: 65535 )]
210+ #[ORM \Column(name: 'name_id_formats ' , type: SerializedArrayType:: NAME , length: 65535 )]
207211 public $ supportedNameIdFormats ;
208212
209213 /**
210214 * @var Service
211215 */
212- #[ORM \Column(name: 'single_logout_service ' , type: \ Doctrine \ DBAL \ Types \Types:: OBJECT , nullable: true , length: 65535 )]
216+ #[ORM \Column(name: 'single_logout_service ' , type: SerializedObjectType:: NAME , length: 65535 , nullable: true )]
213217 public $ singleLogoutService ;
214218
215219 /**
0 commit comments