How configure businessobject to use view?


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I want to make sure that I understand what you are doing. First, you are going to have two totally different sets of BOs, right? One for SQL Server and another for Oracle?



CustomerSqlBO



CustomerOracleBO




Are you doing this because the data type issues? Also, what are your plans for the forms, etc?



I don't need a huge explanation, I just want to be clear on what you are trying to accomplish.
Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)StrataFrame User (197 reputation)
Group: Forum Members
Posts: 153, Visits: 462
We have our BOs set up to point to the DT at the project level and also at the individual BO level. We have about 200 BOs. The types of the columns in SQL are all set to be 100 percent with the way Strataframe generates column types in Oracle. We also made sure that all our code was 100 percent compatible with Oracle.

I want to merely copy all tghe SQL project BOs over the existing Oracle BOs since we have made many changes and want a parallel Oracle BO Project.

My question here is on the Oracle Project after I copy the BO Project files from the SQL Server based BO Project over the Oracle BO project files using the same BO Mapper project:

1. Is there an easy way to just change to default at the project level to Oracle DB with the connect and then in a global step to change the default for each individual BO to point to the Oracle DB?

The tables names are identical. So I would not want to have to go in on each BO and configure it to select the table. No need to since the table and column names are indentical. If I could do this globally then all I would need to do would be to Generate the designer code for all 200 BOs for the entire Oracle Project, then set the global setting back to the DT and all of BOs back to the DT.

We only have a single BO Mapper and did not want to create a second one because setting the defaults in the mapper takes a long time and we realized the wizard to set the defaults still has a bug in it so that must be done 1 column at a time.

I know that this may not be the perfect way to go about handling both SQL Server and Oracle but this is the way we are doing it. If I have to go in each time and configure them separately it takes time.

If the answer to question 1 is to access the Strataframe configuration DB, what tables and columns would I need to change? 

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
LOL...nothing to worry about. Glad you got it figured out Smile
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
I just figured out why we thought it wouldn't work. Originally set it up to use DDT then when we tried to configure an individual BO and selected sQl it complained there was no connection string. Obvious now that going back to the project level, temporarily changing to sql then setting the connection string and then setting it back to DDT lets you have DDT as the default and then configure some the views BOs to use the SQL view directly.



Sorry for the stupid advice but at least I learned something from it. ( it is my learning style - get smart by saying dumb things Cool )



Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
Ok, I have to go back and look at this again. Greg and I hammered on this an came to the conclusion we needed a separate project for the views BOs but it was early in my SF career and I haven't looked at ti closely since.



I don't doubt you're right but somehow we both missed how to do it. Glad be wrong about this one as I found it very non-intuitive and inconvenient and that is not a common feeling in learning strataframe. Smile

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I found that all the business objects in an assembly need to either use DDT or SQL directly, but you can't mix them, since you configure the whole project in the BO mapper to use either DDT or SQL directly.




Charles, thanks for your comments. But I do want to point out that you can in fact have every BO in the entire project pull from an entirely different location. The project settings are defaults only. On each BO when mapped, you can elect to use the DDT, SQL, OLEDB, etc. You can even override the SQL Connection on a per BO basis to pull a schema from an entirely different server if you like.
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Charles R Hankey (01/14/2010)
I found that all the business objects in an assembly need to either use DDT or SQL directly, but you can't mix them, since you configure the whole project in the BO mapper to use either DDT or SQL directly.


Hi Charles,



I am sorry, but you are wrong in that statement. Cool



Each BO can be setup to use any source to get the table schema, just select any BO and right click and choose "Properties" and there you can select any source supported, the same thing can be done at the BO Project level, but this is basically done to get the connection string and sort of the default source, but as you can see each BO can have different Source to read the schema.

Edhy Rijo

Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)Advanced StrataFrame User (964 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
If you have all your business objects in their own assembly ( the way it is done in Strataflix) you will also find you will want a different assembly for business objects that are based on views.



I found that all the business objects in an assembly need to either use DDT or SQL directly, but you can't mix them, since you configure the whole project in the BO mapper to use either DDT or SQL directly.



dgsoft
dgsoft
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Les, Trent,

Thanks for help!



Denis
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Les is right on the money. When you want to pull a schema of a view for a BO, point it to SQL Server and select the view instead of the DDT. SQL Server will then do all of the parsing to give you all of the fields that are available. If you plan on doing updates on this BO, you will want to make sure that you use a BO Mapper override to supply the BO with a default primary key and be sure to make the view bindable to the schema (this is a check box in the DDT on the view).
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search