amphoras wrote: > > Hi, > > I was trying to convert my existing Hibernate mappings into the DSL in > Sculptor, and I was having some problems with certain keywords and > features: > > 1. Is there a "unique" keyword for a property? I want to set > unique="true". The Hibernate documentation is here: > > http://www.hibernate.org/hib_docs/reference/en/html/mapping.html#mapping-declaration-property > > It is to "Enable the DDL generation of a unique constraint for the > columns." >
You can define it as the natural key. unique="true" will be added to properties defined as key. http://www.fornax-platform.org/cp/display/fornax/3.+Advanced+Tutorial+%28CSC%29#3.AdvancedTutorial%28CSC%29-Key If you don't want it to be the natural key SpecialCases.xpt is the rescue again. amphoras wrote: > > 2. Is there a "lazy" keyword for a reference? I'd like to set > lazy="false" for at least the many-to-one, one-to-one, and component > references. I know it's not good to turn off lazy-loading, I'd still like > the support to be there in case we need it. The documentation is here: > > http://www.hibernate.org/hib_docs/reference/en/html/mapping.html#mapping-declaration-manytoone > It is possible to define the fetch attribute, http://www.fornax-platform.org/cp/display/fornax/3.+Advanced+Tutorial+%28CSC%29#3.AdvancedTutorial%28CSC%29-AdditionalReferenceFeatures and when defined it will set lazy="false", but I see that for many-to-one it is not possible to define fetch. For component (BasicType) it is currently not possible to control lazy. You can add a change request in jira. http://www.fornax-platform.org/tracker/browse/CSC amphoras wrote: > > 3. Is it possible to specify that I want to generate a <list> instead of > a <set> in the mapping file? My model uses a java.util.List, but the > Hibernate mapping is for a <set>. I know Hibernate advocates the use of > sets, but I prefer lists. > List is supported Entity Planet { - List<@Moon> moons } http://www.fornax-platform.org/cp/display/fornax/3.+Advanced+Tutorial+%28CSC%29#3.AdvancedTutorial%28CSC%29-AdditionalReferenceFeatures For many-to-many associations List collection type is not supported. We didn't think List would be a good design choice for many-to-many. -- View this message in context: http://www.nabble.com/-Sculptor--Hibernate-mappings-problems-tp18144053s17564p18149070.html Sent from the Fornax-Platform mailing list archive at Nabble.com. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Fornax-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fornax-developer
