﻿<?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?)  » Problem with Join View</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 16:01:55 GMT</lastBuildDate><ttl>20</ttl><item><title>Problem with Join View</title><link>http://forum.strataframe.net/FindPost1097.aspx</link><description>I have a view thus:&lt;br&gt;
SELECT    MRN, FIRSTNAME, LASTNAME, MIDDLENAME, BIRTHDATE, GENDER, ETHNICITY, SSN, STREETADDRESS as ADDR1, OTHERDESIGNATION as ADDR2, CITY, STATE, POSTALCODE, HOMEPHONE, MOTHERMAIDENNAME, COUNTY, LANGUAGE, MARITALSTATUS, RELIGION, WORKPHONE&lt;br&gt;
FROM         AffinityData.dbo.ENTITY&lt;br&gt;
WHERE     (CREATINGFACILITY = 'G') AND (ACTIVE = 'Y')&lt;br&gt;
union&lt;br&gt;
SELECT    MRN, FIRSTNAME, LASTNAME, MIDDLENAME, BIRTHDATE, GENDER, ETHNICITY, SSN, ADDR1, ADDR2, CITY, STATE, ZIP, HOMEPHONE, MOTHERMAIDENNAME, COUNTY, LANGUAGE, MARITALSTATUS, RELIGION, WORKPHONE&lt;br&gt;
FROM         dbo.SvcEntity&lt;br&gt;
&lt;br&gt;
This forum won't let me upload the screen shot of the DDK, but all of the fields appear twice. In SQL the first select always determines the field names used in the result set. I don't know what to make of this duplication but I doubt that it would generate a valid BO.</description><pubDate>Sun, 07 May 2006 00:21:38 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: Problem with Join View</title><link>http://forum.strataframe.net/FindPost1109.aspx</link><description>Yes, we are continuing to work on new improvements to the framework and DDT, and the importing of views and stored procedures is on the list of future enhancements, as is improving the intelligence of the view parsing to produce a more accurate list of the fields returned by the view.</description><pubDate>Sun, 07 May 2006 00:21:38 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Problem with Join View</title><link>http://forum.strataframe.net/FindPost1108.aspx</link><description>OK. I guess that there is no way to automate this?</description><pubDate>Sun, 07 May 2006 00:01:15 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: Problem with Join View</title><link>http://forum.strataframe.net/FindPost1105.aspx</link><description>Yes, it does, however, you could create a profile within the DDT that would be separate from your real profile.&amp;nbsp; In the separate profile, you could create "tables" that would contain the structure of the data returned by your stored procedures and views.&amp;nbsp; Then you would be able to still map your business objects to meta-data within the DDT.&amp;nbsp; This is the method that is generally used when you have a data source that you cannot use as the structure source within the Business Object Mapper (for instance, XML files).</description><pubDate>Sat, 06 May 2006 19:08:15 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Problem with Join View</title><link>http://forum.strataframe.net/FindPost1103.aspx</link><description>ok - but I thought that one of the advantages of the DDK was that you could develop without being connected to the database. &lt;br&gt;
&lt;br&gt;
The combination of not being able to import a view into the DDK plus the necessity to map views (and stored procs?) directly to the database certainly complicates matters.</description><pubDate>Sat, 06 May 2006 17:59:04 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: Problem with Join View</title><link>http://forum.strataframe.net/FindPost1100.aspx</link><description>Daniel,&lt;/P&gt;&lt;P&gt;The Database Deployment Toolkit uses a regular expression to parse out the table names and fields that are part of the view.&amp;nbsp; Unfortunately, it is confused by complex views, so that's why you're getting some strange results within the DDT.&amp;nbsp; However, when the Business Object Mapper creates a business object from a view, it retrieves the field names through the GetSchema() method on the SQL Server native provider.&amp;nbsp; This method isn't confused by complex views, and always returns the proper fields.&amp;nbsp; My suggestion whould be to go ahead and deploy the view and see if the BOMapper will correctly create the business object on it... my bet is that it will.</description><pubDate>Sat, 06 May 2006 10:54:27 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Problem with Join View</title><link>http://forum.strataframe.net/FindPost1098.aspx</link><description>it also shows "AffinityData.Entity WHERE" for the Table name of the first field in the list (PostalCode) and shows "SvcEntity" for the table of all the other entries.</description><pubDate>Fri, 05 May 2006 17:56:21 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item></channel></rss>