Interpretation of the JDO specification ORM (1)

xiaoxiao2021-03-06  44

Let's take a simple example: a class corresponding to a table. There is such a Class: Address Table Structure: Create Table Addr (Street Varchar (255) Primary Key, City Varchar (255), State Char (2), Zipcode Varchar (10), DELIV_INS Clob) Map File Content: < Package name = "com.xyz"> interpretation: 1. , this address is located. 2. , the name of the TABLE corresponding to Address is AddR. 3. , the number of column at the street property is street. 4. Generally, JavaType's String type defaults to the JDBC's varchar (different depending on the database The result, such as Oracle is a varchar2) type, and we can also define the types in the database corresponding to each field. The Deliveryinstructions property is mapped to a ClobN of a Clob type. At the same time, you can also specify the length of each column, not specifying the default value of the database, such as VARCHAR defaults to 256.

转载请注明原文地址:https://www.9cbs.com/read-60968.html

New Post(0)