After pulling in Richard's latest changes everything seems to work as I expect it.
If you want to try take care of following gotchas:
1) start the sakila database
2) make sure your as7 instance has a h2 datasource deployed that corresponds to the sakila
-> put the driver jar (h2-1.3.161.jar) in the as7 deployment folder
->create a file 'sakila-ds.xml' with below contents and put it in the as7
<?xml version="1.0" encoding="UTF-8"?>
3) use the latest hibernate tools plugin available
->forge git-plugin https://github.com/forge/plugin-hibernate-tools.git
4) use the correct settings when reverse engineering:
->entity package: my.test.sakila.model
->path to driver: /Users/koen/Temp/sakila-h2/h2-1.3.161.jar
->detect many to many: true
->detect one to one: true
->detect optimistic lock: true
5) after reverse engineering the db and scaffolding the ui and before deploying don't
forget to edit the persistence.xml file:
-> delete or comment the line <property name="hibernate.hbm2ddl.auto"
-> change the jta-data-source
After doing this, the app should work with the contents of the sakila database.
Op 21-mrt.-2012, om 00:17 heeft Thomas Frühbeck het volgende geschreven:
I tried hard to get the DB working, but I failed :-/
I am positively convinced that the faces scaffold is well prepared to handle primitive
types, only long seems to be unhandled.
If I could get the generated code I would try to fix any problem, but my attempts at
reverse engineering failed :-(
Am 20.03.2012 20:19, schrieb Lincoln Baxter, III:
> Hmm, ok.
> I tried to get to the root cause of this issue, but since I am not familiar with
Metawidget, I hit a road block around line 265 of FacesScaffold.java ( JavaClass viewBean
= JavaParser.parse(JavaClass.class, this.backingBeanTemplate.render(context)); ) The
template simply takes Metawidget's contents and inserts it, I'm not sure how to
> Thomas or Richard, any chance you could take a look at this project (the result of
running the new scaffold on a reverse engineered database.) and see what we can do to
resolve this compliation issue?
> It's specifically caused because the generated entities are using primitive types
(short, long) instead of object types for their ID fields, so I guess we need to support
> Thoughts? How easy is this to fix?
> On Tue, Mar 20, 2012 at 2:49 PM, Koen Aers <koen.aers(a)gmail.com> wrote:
> In attachment the project that was generated from the sakila database
) using the hibernate tools plugin and
scaffolding. It contains a number of problems related to primitive types and their object
> forge-dev mailing list
> Lincoln Baxter, III
> "Simpler is better."