Ticket #759 (new feature request)

Opened 1 year ago

Last modified 4 months ago

MgdSchema needs multivalued fields

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

Description (Last modified by bergie)

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

The implementation most likely needs to have a multilang-like additional table where the different values are stored, and from where they are then queried with SQL JOINs.

Something like:

<type name="midgard_person">
    ...
    <property name="email" type="string" multiple="true"/>
</type>

$person = new midgard_person();
$person->email[] = 'user@domain.com';
$person->email[] = 'firstname.lastname@domain.com';
$person->create();

$qb = new midgard_query_builder('midgard_person');
$qb->add_constraint('email', '=', 'user@domain.com');
$persons = $qb->execute();
echo $persons[0]->email[0]; // will output user@domain.com

Change History

01/29/09 12:18:08 changed by bergie

  • description changed.

02/09/09 16:37:06 changed by bergie

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

Will not be accomplished in Vinland.

09/05/09 14:26:37 changed by rambo

  • priority changed from major to blocker.

If we are to use multivalued fields properly they must be present from the go in Mjölnir, for example metadata->authors should be a multivalued link field (the current convention of using pipe separated GUIDs is an ugly hack).

Also, this needs an mRFC.

09/14/09 16:43:27 changed by bergie

  • priority changed from blocker to major.

11/09/09 16:38:40 changed by bergie

  • milestone changed from 9.09 Mjolnir to 10.03 Ratatoskr.

11/09/09 17:30:00 changed by bergie

  • keywords set to iks.