Re: [smartweb-devel] Smartweb Auth and problem with XDoclet/ Hibernate union subclass
Brought to you by:
rlogiacco
From: Gaetano P. <gpe...@sm...> - 2007-11-08 22:17:06
|
I'll take the opportunity to express my vote: +1 to joined subclass Evaluating pros and cons i thing is the best we can do at this time svetrini wrote: > > Ok i vote for joined subclass... > And now I'm waiting for Gaetano's vote > > :-) > > 2007/11/8, Roberto Lo Giacco <rlo...@sm...>: >> >> Humm... I think you still need the Gaetano's vote, plus you haven't >> voted yet.... >> >> 2007/11/8, Stefano V <st...@gm...>: >> > Thank you for the answers! >> > >> > When i have time, I'll change the code to the joined subclass in auth >> > module... >> > >> > 2007/11/7, Roberto Lo Giacco < rlo...@us...>: >> > > >> > > The problem using sequence generator is some database doesn't support >> > > sequences: the consequence will be an unsable auth module on those >> > > databases. >> > > >> > > An analysis og pros and cons of the two choices could be more >> helpful. >> > > >> > > Joined Subclass >> > > Pros >> > > # Well known and supported by xdoclet without needing to be >> patched >> > > # Supported by all databases >> > > # Allows database constraints >> > > # Better performances if a list of Subjects is requested (only id >> and >> > > display properties) >> > > Cons >> > > # Requires an additional Subject table >> > > # Full queries on Subject, User or Group needs a JOIN on twoor >> three >> > > tables >> > > # Pessimistical locking need to acquire 2 locks >> > > >> > > Union Subclass >> > > Pros >> > > # Better performances on quering User and Group entities as no >> JOIN is >> > > requested >> > > # No additional table exposed >> > > # Easier to query using plain SQL outside Hibernate >> > > Cons >> > > # Quering Subject needs a UNION, whatever infos you need >> > > # Same field on two tables >> > > # Needs sequence support on the database >> > > >> > > >> > > Gaetano Perrone wrote: >> > > > >> > > > I delve into the problem and hibernate documentation says that >> identity >> > > > generator strategy is not allowed in union subclass inheritance, >> indeed >> > > > the primary key seed has to be shared accross all unioned >> subclasses >> of >> > a >> > > > hierarchy. >> > > > The suggested approch for generating table for concrete class is >> to >> use >> > a >> > > > sequence generator strategy instead of native. With this approch >> each >> > > > table defines columns for all properties of the class, including >> > inherited >> > > > properties. The limitation of this approach is that if a property >> is >> > > > mapped on the superclass, the column name must be the same on all >> > subclass >> > > > tables. (Hibernate group is going to relax this in a future >> release). >> > > > This means that a dedicated class tree sequence could be >> > > > introduced....Otherwise i don't know what happens using the >> > > > hibernate_sequence as sequence instead of generator native... >> > > > What do u thing about it?? >> > > > >> > > >> > > -- >> > > View this message in context: >> > >> http://www.nabble.com/Smartweb-Auth-and--problem-with-XDoclet--Hibernate-union-subclass-tf4761003s17546.html#a13625607 >> > > Sent from the SmartWeb Developers mailing list archive at Nabble.com. >> > > >> > > >> > > >> > >> ------------------------------------------------------------------------- >> > > This SF.net email is sponsored by: Splunk Inc. >> > > Still grepping through log files to find problems? Stop. >> > > Now Search log events and configuration files using AJAX and a >> browser. >> > > Download your FREE copy of Splunk now >> http://get.splunk.com/ >> > > _______________________________________________ >> > > smartweb-devel mailing list >> > > sma...@li... >> > > >> > https://lists.sourceforge.net/lists/listinfo/smartweb-devel >> > > >> > >> > >> > >> ------------------------------------------------------------------------- >> > This SF.net email is sponsored by: Splunk Inc. >> > Still grepping through log files to find problems? Stop. >> > Now Search log events and configuration files using AJAX and a browser. >> > Download your FREE copy of Splunk now >> http://get.splunk.com/ >> > _______________________________________________ >> > smartweb-devel mailing list >> > sma...@li... >> > https://lists.sourceforge.net/lists/listinfo/smartweb-devel >> > >> > >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> smartweb-devel mailing list >> sma...@li... >> https://lists.sourceforge.net/lists/listinfo/smartweb-devel >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > smartweb-devel mailing list > sma...@li... > https://lists.sourceforge.net/lists/listinfo/smartweb-devel > > -- View this message in context: http://www.nabble.com/Smartweb-Auth-and--problem-with-XDoclet--Hibernate-union-subclass-tf4761003s17546.html#a13657083 Sent from the SmartWeb Developers mailing list archive at Nabble.com. |