File tree Expand file tree Collapse file tree 1 file changed +39
-1
lines changed Expand file tree Collapse file tree 1 file changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,44 @@ Example:
274
274
coordinates: { range: "GeoCoordinates", embedded: true, columnPrefix: false }
275
275
` ` `
276
276
277
+ or
278
+
279
+ ` ` ` yaml
280
+ QuantitativeValue:
281
+ embeddable: true
282
+ Product:
283
+ weight: { range: "QuantitativeValue", embedded: true, columnPrefix: "weight_" }
284
+ ` ` `
285
+
286
+ Output :
287
+
288
+ ` ` ` php
289
+ <?php
290
+
291
+ ...
292
+ use Doctrine\O RM\M apping as ORM;
293
+
294
+ /**
295
+ * Any offered product or service.
296
+ *
297
+ * @see http://schema.org/Product Documentation on Schema.org
298
+ *
299
+ * @ORM\E ntity
300
+ * @ApiResource(iri="http://schema.org/Product")
301
+ * @UniqueEntity("gtin13s")
302
+ */
303
+ class Product
304
+ {
305
+ /**
306
+ * @var QuantitativeValue|null the weight of the product or person
307
+ *
308
+ * @ORM\E mbedded(class="App\E ntity\Q uantitativeValue", columnPrefix="weight_")
309
+ * @ApiProperty(iri="http://schema.org/weight")
310
+ */
311
+ private $weight;
312
+
313
+ ` ` `
314
+
277
315
# # Author PHPDoc
278
316
279
317
Add a `@author` PHPDoc annotation to class' DocBlock.
@@ -635,7 +673,7 @@ config:
635
673
embedded: false
636
674
637
675
# The property columnPrefix
638
- columnPrefix: false
676
+ columnPrefix: false # Example: "weight_"
639
677
640
678
# Annotation generators to use
641
679
annotationGenerators:
You can’t perform that action at this time.
0 commit comments