http://wiki.ablecommerce.com/index.php?title=Deprecated_Id_Properties&feed=atom&action=historyDeprecated Id Properties - Revision history2024-03-28T11:52:17ZRevision history for this page on the wikiMediaWiki 1.23.17http://wiki.ablecommerce.com/index.php?title=Deprecated_Id_Properties&diff=1169&oldid=prevSohaib at 11:21, 15 August 20132013-08-15T11:21:55Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 11:21, 15 August 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>For AbleCommerce 7.0.[0-7] all entity classes had Id properties with class names which were also matching the database column name, for example "ProductId" property for Product class. <del class="diffchange diffchange-inline">But for </del>AbleCommerce Gold <del class="diffchange diffchange-inline">for </del>all entity classes the Id property is renamed to "Id", though we still have alias properties with old names for backward compatibility. The underlying reason is a combination of NHibernate and generics. We have a single base "Entity" class. This class defines a property named Id and this is shared in common with all of our objects that are mapped to the database. This is the field that actually does the work, while the ProductId field is just an alias to the Id property. And the Id property is here to stay. It seemed odd to have two names for the same property so the alias was deprecated.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>For AbleCommerce 7.0.[0-7] all entity classes had Id properties with class names which were also matching the database column name, for example "ProductId" property for Product class.  </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">For </ins>AbleCommerce Gold <ins class="diffchange diffchange-inline">in </ins>all entity classes the Id property is renamed to "<ins class="diffchange diffchange-inline">'''</ins>Id<ins class="diffchange diffchange-inline">'''</ins>", though we still have alias properties with old names for backward compatibility.  </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The underlying reason is a combination of NHibernate and generics. We have a single base "Entity" class. This class defines a property named Id and this is shared in common with all of our objects that are mapped to the database. This is the field that actually does the work, while the ProductId field is just an alias to the Id property. And the Id property is here to stay. It seemed odd to have two names for the same property so the alias was deprecated.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>To a lesser extent a reason was that common practice with NHibernate is to have a mapped field named Id. So if we had been starting from scratch we likely would have used Id as the table column name rather than ProductId to better match those patterns.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>To a lesser extent a reason was that common practice with NHibernate is to have a mapped field named Id. So if we had been starting from scratch we likely would have used Id as the table column name rather than ProductId to better match those patterns.</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 6:</td>
<td colspan="2" class="diff-lineno">Line 10:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>NOTE: Though we have duplicate/repetitive properties for each entity class (e.g. ProductId and Id for Product class), using Id is preferred. All of our classes have an Id property (even the ones using composite keys).</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>NOTE: Though we have duplicate/repetitive properties for each entity class (e.g. ProductId and Id for Product class), using Id is preferred. All of our classes have an Id property (even the ones using composite keys).</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:AbleCommerce Gold]]</ins></div></td></tr>
</table>Sohaibhttp://wiki.ablecommerce.com/index.php?title=Deprecated_Id_Properties&diff=1073&oldid=prevNaveed at 14:10, 30 November 20122012-11-30T14:10:46Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 14:10, 30 November 2012</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 4:</td>
<td colspan="2" class="diff-lineno">Line 4:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Right now there is no plan to actually remove the properties. The obsolete warning was added to encourage people to prefer the Id property and also to ensure we updated all of our internal codes.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Right now there is no plan to actually remove the properties. The obsolete warning was added to encourage people to prefer the Id property and also to ensure we updated all of our internal codes.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">NOTE: Though we have duplicate/repetitive properties for each entity class (e.g. ProductId and Id for Product class), using Id is preferred. All of our classes have an Id property (even the ones using composite keys).</ins></div></td></tr>
</table>Naveedhttp://wiki.ablecommerce.com/index.php?title=Deprecated_Id_Properties&diff=1070&oldid=prevNaveed: New page: For AbleCommerce 7.0.[0-7] all entity classes had Id properties with class names which were also matching the database column name, for example "ProductId" property for Product class. But ...2012-11-29T15:37:28Z<p>New page: For AbleCommerce 7.0.[0-7] all entity classes had Id properties with class names which were also matching the database column name, for example "ProductId" property for Product class. But ...</p>
<p><b>New page</b></p><div>For AbleCommerce 7.0.[0-7] all entity classes had Id properties with class names which were also matching the database column name, for example "ProductId" property for Product class. But for AbleCommerce Gold for all entity classes the Id property is renamed to "Id", though we still have alias properties with old names for backward compatibility. The underlying reason is a combination of NHibernate and generics. We have a single base "Entity" class. This class defines a property named Id and this is shared in common with all of our objects that are mapped to the database. This is the field that actually does the work, while the ProductId field is just an alias to the Id property. And the Id property is here to stay. It seemed odd to have two names for the same property so the alias was deprecated.<br />
<br />
To a lesser extent a reason was that common practice with NHibernate is to have a mapped field named Id. So if we had been starting from scratch we likely would have used Id as the table column name rather than ProductId to better match those patterns.<br />
<br />
Right now there is no plan to actually remove the properties. The obsolete warning was added to encourage people to prefer the Id property and also to ensure we updated all of our internal codes.</div>Naveed