Ticket #761 (new feature request)

Opened 1 year ago

Last modified 4 months ago

MgdSchema needs required fields

Reported by: bergie Assigned to: piotras
Priority: minor Milestone: 10.03 Ratatoskr
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.