Ticket #761 (closed feature request: duplicate)

Opened 2 years ago

Last modified 3 months ago

MgdSchema needs required fields

Reported by: bergie Assigned to: piotras
Priority: minor Milestone:
Component: Midgard Core Version: 9.09 Mjolnir
Keywords: iks Cc:

Description

To synchronize MgdSchema?'s features a bit with JCR Node Type Notation, we should support required properties.

If object is being saved without a required field having a value, Midgard should throw an exception and abort that save.

Something like:

<type name="org_openpsa_products_product">
    ...
    <property name="title" type="string" required="yes"/>
</type>

$product = new org_openpsa_products_product();
$product->description = "Blah";
// No title set
$product->create(); // Will throw midgard_error_requiredfield exception and not save the product

Change History

01/29/09 21:53:17 changed by piotras

We need additional functionality here. There should be some way to define what is not null value for particular type. Is 0 allowed for int, for strings, etc.

03/27/09 17:05:47 changed by piotras

  • version changed from 9.03 Vinland to 9.09.
  • milestone changed from 9.03 Vinland to 9.09 Mjolnir.

11/09/09 17:29:47 changed by bergie

  • keywords set to iks.

11/18/09 12:38:35 changed by bergie

  • milestone changed from 9.09 Mjolnir to 10.03 Ratatoskr.

06/01/10 14:57:13 changed by bergie

  • status changed from new to closed.
  • resolution set to duplicate.

06/01/10 15:54:07 changed by

  • milestone deleted.

Milestone 10.05.1 Ratatoskr deleted