Ticket #759 (closed feature request: duplicate)

Opened 2 years ago

Last modified 3 months ago

MgdSchema needs multivalued fields

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

04/15/10 20:14:20 changed by piotras

  • milestone changed from 10.05 Ratatoskr to 10.11 Hrungnir.

06/01/10 14:01:48 changed by bergie

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

06/01/10 14:09:30 changed by

  • milestone deleted.

Milestone 10.11 Hrungnir deleted