I'm trying to migrate a new application to 3.1d, as it seems likely that 3.1 will be released before development is complete.
The behavior of the HibernateDataSource, though, has changed. None of the annotated fields are being automatically declared in the auto-inherited datasource object.
Here is the annotated class:
Here is book.ds.xml:
Here is the output using v3.0 of the DataSourceLoader servlet:
And here is the output using 3.1d of the DataSourceLoader servlet:
The behavior of the HibernateDataSource, though, has changed. None of the annotated fields are being automatically declared in the auto-inherited datasource object.
Here is the annotated class:
Code:
package com.examples; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="BOOK") public class Book { private Long id; private String title; private Date datePublished; /** * @return the id */ @GeneratedValue(strategy = GenerationType.IDENTITY) @Id @Column(name="BOOK_ID") public Long getId() { return id; } /** * @param id the id to set */ public void setId(Long id) { this.id = id; } /** * @return the title */ @Column(name="BOOK_TITLE") public String getTitle() { return title; } /** * @param title the title to set */ public void setTitle(String title) { this.title = title; } /** * @return the datePublished */ @Column(name="DATE_PUBLISHED") public Date getDatePublished() { return datePublished; } /** * @param datePublished the datePublished to set */ public void setDatePublished(Date datePublished) { this.datePublished = datePublished; } }
Code:
<DataSource ID="book" serverType="hibernate" beanClassName="com.examples.Book" schemaBean="com.examples.Book"> <fields> <field name="id" type="sequence" hidden="true" primaryKey="true" /> </fields> </DataSource>
Code:
isc.DataSource.create({ ID:"book", inheritsFrom:isc.DataSource.create({ xmlFromConfig:"true", ID:"book_inheritsFrom", dataSourceVersion:"1", entityName:"com.samples.Book", serverType:"hibernate", generatedBy:"v8.2p_2012-04-30/Enterprise Deployment 2012-04-30", fields:[ { name:"id", type:"integer" }, { name:"title", type:"text" }, { name:"datePublished", type:"date" } ] }) , fields:[ { hidden:true, primaryKey:true, name:"id", type:"sequence" } ], serverType:"hibernate" })
Code:
if (window.isc == undefined || window.isc.DataSource == undefined){ alert("Can't load DataSources - SmartClient runtime not loaded");}isc.DataSource.create({ allowAdvancedCriteria:true, ID:"book", autoDeriveSchema:true, inheritsFrom:isc.DataSource.create({ allowAdvancedCriteria:true, dropExtraFields:true, ID:"Book_inheritsFrom", serverType:"hibernate", generatedBy:"SNAPSHOT_v8.3d_2012-08-13/Enterprise Deployment 2012-08-13", fields:[ ] }) , fields:[ { hidden:true, primaryKey:true, name:"id", type:"sequence" } ], serverType:"hibernate" })
Comment