Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Articles
Articles_pt
CreateDAO_es
CreateDAO_pt
CreateDAO_sp
CreateDAOiBATIS
CreateManager
CreateManager_es
CreateManager_ko
CreateManager_zh
...and 3 more




JSPWiki v2.2.33

[RSS]


Hide Menu

CreateDAO


Difference between version 86 and version 85:

At line 85 changed 1 line.
;:%%(color: blue)''I'm using {{generator-class="increment"}} instead of {{generate-class="native"}} because I [found some issues|AppFuseOnDB2] when using "native" on other databases. If you only plan on using MySQL, I recommend you use the "native" value.''%%
;:%%(color: blue)''I'm using {{generator-class="increment"}} instead of {{generate-class="native"}} because I [found some issues|AppFuseOnDB2] when using "native" on other databases. If you only plan on using MySQL, I __recommend you use the "native" value__. This tutorial uses increment.''%%
At line 91 changed 1 line.
[schemaexport] id bigint not null auto_increment,
[schemaexport] id bigint not null,
At line 141 removed 1 line.
* @return Returns the firstName.
At line 149 removed 1 line.
* @return Returns the lastName.
At line 162 changed 3 lines.
[schemaexport] id BIGINT NOT NULL,
[schemaexport] first_name VARCHAR(255),
[schemaexport] last_name VARCHAR(255),
[schemaexport] id bigint not null,
[schemaexport] first_name varchar(50),
[schemaexport] last_name varchar(50),
At line 166 changed 1 line.
[schemaexport] )}}}
[schemaexport] );}}}
At line 168 changed 1 line.
If you want to change the size of your columns, specify a length=''size'' attribute in your @hibernate.property tag. If you want to make it a required field (NOT NULL), add not-null="true".
If you want to change the size of your columns, modify the ''length'' attribute in your @hibernate.property tag. If you want to make it a required field (NOT NULL), add not-null="true".
At line 261 changed 1 line.
;:%%(color: blue)''In the testGetPerson method, we're creating a person and then calling a get. I usually enter a record in the database that I can always rely on. Since [DBUnit|http://www.dbunit.org] is used to populate our database with test data before our tests are run, you can simply add the new table/record to the metadata/sql/sample-data.xml file:''%%
;:%%(color: blue)''In the testGetPerson method, we're creating a person and then calling a get. I usually enter a record in the database that I can always rely on. Since [DBUnit|http://www.dbunit.org] is used to populate the database with test data before our tests are run, you can simply add the new table/record to the metadata/sql/sample-data.xml file:''%%
At line 305 removed 2 lines.
import java.util.List;
At line 308 removed 1 line.
public List getPeople(Person person);
At line 322 added 1 line.
import org.springframework.orm.ObjectRetrievalFailureException;
At line 328 removed 2 lines.
import java.util.List;
At line 332 removed 4 lines.
public List getPeople(Person person) {
return getHibernateTemplate().find("from Person");
}
At line 346 changed 1 line.
public void savePerson(Object person) {
public void savePerson(Person person) {
At line 414 changed 1 line.
Total time: 14 seconds%%
Total time: 9 seconds%%

Back to CreateDAO, or to the Page History.