Field names in database
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > Field names in database




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Field names in database  
Alejandro


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-25-06 04:39 PM

I don't understand how are fields in database associated with commerce serve
r
objects.
For example, po["saved_shipping_total"], I'd like to know what table and
column is.  Where is that association stored? or is it hardcoded?
thanks





[ Post a follow-up to this message ]



    Re: Field names in database  
Jeff Lynch


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-25-06 04:39 PM

Alejandro,

As with most .NET applications that access a database, the association
between the object's properties and their associated field in the database
tables is usually stored in the application's data access layer. In CS2002
many properties (especially any custom properties you create) are stored in
binary form and may not be in a specific database "field". You should
generally access these properties using the CS2002 base class libraries
(BCL) as shown in the CS2002 help file and not directly from the database.

--
Jeff Lynch
"Ramblings From A [Microsoft] Connected Universe"
http://codebetter.com/blogs/jeff.lynch


"Alejandro" <Alejandro@discussions.microsoft.com> wrote in message
news:7F1C9490-F75D-4AEC-AA22-5A2E2C4BB6AE@microsoft.com...
>I don't understand how are fields in database associated with commerce
>server
> objects.
> For example, po["saved_shipping_total"], I'd like to know what table a
nd
> column is.  Where is that association stored? or is it hardcoded?
> thanks







[ Post a follow-up to this message ]



    RE: Field names in database  
Ravi Shankar


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-25-06 04:39 PM

Hi Alejandro,

Further to the note of caution stated by Jeff the linkage is as follows..

There are some common rules pertaining to key storage. Only the keys start
DO NOT start with an "_" are persisted. There should be a field in the table
which matches the key name 

Keys at PurchaseOrder level will be stored in the OrderGroup Table.
Keys at OrderForm level will be stored in the OrderFormHeader Table.
Keys at LineItem level will be stored in the OrderFormLineItems Table.
Keys in the Address collection will be stored in the OrderGroupAddresses
Table.

--
Ravi Shankar


"Alejandro" wrote:

> I don't understand how are fields in database associated with commerce ser
ver
> objects.
> For example, po["saved_shipping_total"], I'd like to know what table a
nd
> column is.  Where is that association stored? or is it hardcoded?
> thanks





[ Post a follow-up to this message ]



    RE: Field names in database  
Alejandro


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-01-06 07:39 PM

Thanks a lot!
I didn't understand that part:

> There are some common rules pertaining to key storage. Only the keys start
> DO NOT start with an "_" are persisted. There should be a field in the tab
le
> which matches the key name 

particularly, "Only the keys start  DO NOT " seems to be missing something?


"Ravi Shankar" wrote:
[vbcol=seagreen]
> Hi Alejandro,
>
> Further to the note of caution stated by Jeff the linkage is as follows..
>
> There are some common rules pertaining to key storage. Only the keys start
> DO NOT start with an "_" are persisted. There should be a field in the tab
le
> which matches the key name 
>
> Keys at PurchaseOrder level will be stored in the OrderGroup Table.
> Keys at OrderForm level will be stored in the OrderFormHeader Table.
> Keys at LineItem level will be stored in the OrderFormLineItems Table.
> Keys in the Address collection will be stored in the OrderGroupAddresses
> Table.
>
> --
> Ravi Shankar
>
>
> "Alejandro" wrote:
> 





[ Post a follow-up to this message ]



    RE: Field names in database  
Ravi Shankar


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-01-06 07:39 PM

Hi Alejandro,

Sorry about that.. did not notice that slip till you pointed it out.

What I'd wanted to state was that only those keys in object whose names do
not start with an "_" (underscore) are persisted. All the objects, basket,
purchase order, template are derived from the ordergroup class which, if you
examine is an implementation of the commerce server "dictionary" class. Most
commonly used keys on the ordergroup object have been strong-named as
properties in these objects which is why you can still bypass some of these
object properties by using the ".item(<key_name> )" notation.

The "Save" option uses the "DBStorage" class to persist these objects into
the underlying data stores. If you read the documentation pertaining to the
way DBStorage works, you'll find that it is a class that converts the
dictionary to the table. You'll find this bit about "_" there. You will also
then understand how to extend the underlying DB to store your own keys. 
--
Ravi Shankar


"Alejandro" wrote:
[vbcol=seagreen]
> Thanks a lot!
> I didn't understand that part:
> 
>
> particularly, "Only the keys start  DO NOT " seems to be missing something
?
>
>
> "Ravi Shankar" wrote:
> 





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:31 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register