﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » PrimaryKeyFields Property on a BO</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 10:51:40 GMT</lastBuildDate><ttl>20</ttl><item><title>PrimaryKeyFields Property on a BO</title><link>http://forum.strataframe.net/FindPost2141.aspx</link><description>I have a BO that is based on a view.&amp;nbsp; The view has no column marked as the primary key so the BO mapper does not build the key into the designer file.&amp;nbsp; I am using this view to locate records using the BrowseDialog, becuase there is no primary key field, when the data is returned the BO currentrow is set to the first row in the datatable.&amp;nbsp; If I manually add the code to the designer file so that the BO knows what the key field of the view is, everything works fine.&amp;nbsp; Do you have an suggestions on how I can work with this situation?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Scott</description><pubDate>Thu, 10 Aug 2006 16:15:45 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: PrimaryKeyFields Property on a BO</title><link>http://forum.strataframe.net/FindPost2150.aspx</link><description>Thats kind of what I thought.&amp;nbsp; Thanks</description><pubDate>Thu, 10 Aug 2006 16:15:45 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: PrimaryKeyFields Property on a BO</title><link>http://forum.strataframe.net/FindPost2149.aspx</link><description>You can add indexes to views, but not primary keys.&amp;nbsp; So, if you pull the view directly from SQL Server, the business object is not going to see the primary key.&amp;nbsp; The only way to get the BOMapper to see the primary key on a view is to use the Database Deployment Toolkit and create a table with the same structure as the view.&amp;nbsp; You can then define the primary key on the "faux" table and map your business object to it.&amp;nbsp; Then when you build the partial from the DDT information, you will be able to see the primary key.</description><pubDate>Thu, 10 Aug 2006 16:06:10 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>