new demo, understanding JPA entities lifecycle
copying existing JPA project
starting maven project with pom file. dependencies: junit, jpa, hibernate and derby
added persistence context configuration file from existing project
complete information about how we will start from an existing project
create Person JPA entity. annotate it to configure how hibernate stores it
create unit test to test basic persistence. in red up to now
implement the first test. all code is in only one method
complete description of step 'testing basic persistence'
refactor test to create entity manager factory, entity manager and transaction in the setUp method and close them in the tearDown one
refactor: managing transaction
write a more complex persistence situation, but not too much ;)
new test: check when an entity is in a 'new' state
new test: check transition from new to managed states
new test: transition from managed to detached using detach method
new test: transition from managed to detached closing entity manager
new test: from managed to removed
a couple of new test, new transitions
remove older project
split some lines