StrataFrame Forum

Creating Read-Only BO on View

http://forum.strataframe.net/Topic803.aspx

By Kevin Lingofelter - 4/14/2006

I have a complex view that joins 6 different tables in an Access database. I'd like to create a read-only BO to access the view results.

Is this possible?

Thanks!

By Trent L. Taylor - 4/14/2006

Yes, it is possible.  A business object mapper has the ability to map to a view.  We have done this a number of times in SQL Server.  Does the Access view not show up in the BO Mapper for assignment to a business object?  I will look at this also and see if I can reproduce the scenario.

It should be as simple as mapping a BO to a view instead of a table.  If the view is not available for selection then let me know and we can go from there.

By Kevin Lingofelter - 4/14/2006

Yeah...when using Access views are not displayed in the object mapper...(at least not here)
By Trent L. Taylor - 4/14/2006

OK.  I will take a look at it Wink.  Thanks.  Just out of curiosity...do you ever sleep Smile?  You are a hard working man!
By Kevin Lingofelter - 4/15/2006

hehe...sleep is a long distant friend...BigGrin

Until you get the mapper worked out, is there a work around for this? I am nearly finished here and would like to wrap this project up today if possible.

Thanks!

By Trent L. Taylor - 4/15/2006

I can relate on the sleep front Smile ... I think this is the norm for a software developer.

You could use the Database Deployment Toolkit to create the structure that you want to use.  Map your business object to that structure, then in your fill methods, simply refer to the view.  This way the business object will be strong-typed to the view structure.  I know this is more work, but it is an interim solution.  Let me know if this will work for you.