hibernate @ struts

I need to use hibernate on struts + servlet

but I don't know which one / combination is required (very confusing for a newbie on hibernate)

Hibernate Core          Hibernate for Java, native APIs and XML mapping metadata
Hibernate Annotations         Map classes with JDK 5.0 annotations
Hibernate EntityManager         Standard Java Persistence API for Java SE and Java EE
Hibernate Shards         Horizontal data partitioning framework
Hibernate Validator         Data integrity annotations and validation API
Hibernate Search         Hibernate integration with Lucene for indexing and querying data
Hibernate Tools         Development tools for Eclipse and Ant
NHibernate         The NHibernate service for the .NET framework
JBoss Seam         Framework for JSF, Ajax, and EJB 3.0/Java EE 5.0 applications

TOP

乜咁大個家族

TOP

I will use the following components -
Hibernate Core - (required) core lib
Hibernate Annotations - (optional) for database definition in Java source using annotation way
Hibernate EntityManager - (optional) for Java Persistence
Hibernate Tools - generate DDL script

TOP

原帖由 阿水 於 2008-12-26 00:06 發表
but I don't know which one / combination is required (very confusing for a newbie on hibernate)

Hibernate Core          Hibernate for Java, native APIs and XML mapping metadata
Hibernate Annotations         Map cl ...


如果你唔係一定跟EJB3 standard 既話, Hibernate Core 就得

TOP

原帖由 simon77 於 2008-12-26 03:59 發表
I will use the following components -
Hibernate Core - (required) core lib
Hibernate Annotations - (optional) for database definition in Java source using annotation way
Hibernate EntityManager - (opt ...


我個人唔鍾意用Hibernate 幫我generate 埋DDL, 我認為database 應該自行設計, 否則他日難以fine tune

TOP

原帖由 thinkpanda 於 2008-12-26 10:14 AM 發表


如果你唔係一定跟EJB3 standard 既話, Hibernate Core 就得


OK
Moreover, how to implement a tree like strucutre with hiibernate

but docs is a bit mesh
Table for District
District_id (unique)
Parent_District_id (link to parent)
Other attribute

TOP

原帖由 阿水 於 2008-12-26 11:54 發表


OK
Moreover, how to implement a tree like strucutre with hiibernate

but docs is a bit mesh
Table for District
District_id (unique)
Parent_District_id (link to parent)
Other attribute :ador ...


Oh..  你之前無講話用 Hibernate.
想像你有一個district class map 落去District table.
呢個District Class 佢可以有一個parent attribute, 佢其實又係一個District class. 咁你可以好簡單map 落去relational table.
但係如果你用呢種做法做, 而又要所有distruct 一次過print 出黎既話就唔好逐個district load, 先全部load 哂, 再用recursion 排番正確次序,

TOP

原帖由 thinkpanda 於 2008-12-27 11:33 AM 發表


Oh..  你之前無講話用 Hibernate.
想像你有一個district class map 落去District table.
呢個District Class 佢可以有一個parent attribute, 佢其實又係一個District class. 咁你可以好簡單map 落去relational tab ...


any hint for the hibernate configuration file

also the nekohtml was unable to parse the kmb url (please refer to the other topic)

TOP

原帖由 阿水 於 2008-12-27 16:47 發表


any hint for the hibernate configuration file

also the nekohtml was unable to parse the kmb url (please refer to the other topic)


I think it is just simple "many-to-one" relationship, the example in reference document should be enough.

TOP