<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 25 01:59:30 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DDC-298/DDC-298.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DDC-298] Allow Entity to hold a collection of a single primitive type</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-298</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Sometimes you want to save arbitrary information for an entity using a key -&amp;gt; value array-structure. JPA supports this by means of the @ElementCollection annotation with allows to specify HashMaps for example.&lt;/p&gt;

&lt;p&gt;I propose a new AssocationMapping called &quot;ElementMapping&quot; / &quot;ElementCollection&quot; and annotations (options):&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;ElementCollection
+ elementTable
+ keyType
+ keyLength
+ keyColumnDefinition
+ valueType
+ valueLength
+ valueColumnDefinition
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The key and value definitions are necessary for converting and schema generation.&lt;/p&gt;

&lt;p&gt;The implementation would make use of the PersistentCollection at all times and work as any other persistent collection just with primitive types.&lt;/p&gt;

&lt;p&gt;Restrictions for a first implementation:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Only available as a Lazy-Load Collection, no hydration with the source entity&lt;/li&gt;
	&lt;li&gt;Can&apos;t be used in queries alike &quot;entity.colname.key = ?1&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Use-Case:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$entity-&amp;gt;options[&apos;foo&apos;] = &apos;bar&apos;;
$entity-&amp;gt;options[&apos;bar&apos;] = &apos;baz&apos;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This could be done for 2.0 imho, adding the necessary changes and optimizations could then be scheduled for 2.1&lt;/p&gt;</description>
                <environment></environment>
            <key id="10829">DDC-298</key>
            <summary>Allow Entity to hold a collection of a single primitive type</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 2 Feb 2010 22:54:51 +0000</created>
                <updated>Fri, 24 Dec 2010 05:05:59 +0000</updated>
                                    <version>2.1</version>
                                <fixVersion>2.x</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="11585" author="beberlei" created="Tue, 2 Feb 2010 22:57:00 +0000"  >&lt;p&gt;In this implementation Schema-Tool would generate a table:&lt;/p&gt;

&lt;p&gt;elementTable (entity_id-1, ..., entity_id-n, key, value) and using the Platform Type Generation of keyType and valueType&lt;/p&gt;</comment>
                    <comment id="11586" author="beberlei" created="Tue, 2 Feb 2010 23:04:43 +0000"  >&lt;p&gt;Column Names should be Change-able also since there could be people who name their primary keys &quot;key&quot; and &quot;value&quot; o_O&lt;/p&gt;</comment>
                    <comment id="11587" author="beberlei" created="Tue, 2 Feb 2010 23:05:43 +0000"  >&lt;p&gt;Ordering could be implemented on top of this using the @OrderColumn JPA implementation by adding another column to the table with a numeric order that will be &quot;order by&quot;&apos;d on select time.&lt;/p&gt;</comment>
                    <comment id="15009" author="beberlei" created="Fri, 24 Dec 2010 05:05:59 +0000"  >&lt;p&gt;Pushed back&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>