Btw, ignore the inconsistency in package names.

----- Original Message ----- From: "Rene Lavoie" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, December 09, 2006 2:12 AM
Subject: Re: [appfuse-user] xdoclet unique-key question


ant setup ends with:
[schemaexport] (cfg.Configuration 240 ) Reading mappings from file: C:\work\appfuse\build\dao\gen\com\appfuse\model\LiteralText.hbm.xml [schemaexport] (cfg.HbmBinder 309 ) Mapping class: com.appfuse.model.LiteralText -> literal_text

BUILD FAILED
C:\work\appfuse\build.xml:744: Schema text failed: Could not read mapping document from file:
C:\work\appfuse\build\dao\gen\com\appfuse\model\LiteralText.hbm.xml


File that is generated looks like:
<?xml version="1.0" encoding="UTF-8"?>


<!DOCTYPE hibernate-mapping PUBLIC

"-//Hibernate/Hibernate Mapping DTD 3.0//EN"

"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>


<hibernate-mapping>

<class name="com.aparapar.model.LiteralText" table="literal_text">

<id name="id" column="id" type="java.lang.Long">

<!-- The generator-class attribute of @hibernate.id is deprecated, use the @hibernate.generator tag instead -->

<generator class="native">

</generator>

</id>

<property name="literalValue" column="literal_value"

length="4000" not-null="true">

</property>

<many-to-one name="webApp"

class="com.appfuse.model.WebApplication" column="app_id"

not-null="true" cascade="none">

<column name="app_id" unique-key="IDX_LITERAL_APP_UNIQUE" />

</many-to-one>

<property name="description" column="description" length="4000"

not-null="true">

</property>

<property name="literalKey" column="literal_key" length="150"

not-null="true">

<column name="literal_key"

unique-key="IDX_LITERAL_APP_UNIQUE" />

</property>

</class>

</hibernate-mapping>


----- Original Message ----- From: "Matt Raible" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, December 08, 2006 11:02 PM
Subject: Re: [appfuse-user] xdoclet unique-key question


Can you post the full error/stacktrace you're seeing?

Thanks,

Matt

On 12/8/06, Rene Lavoie <[EMAIL PROTECTED]> wrote:
Hello,

I m trying to map a unique constraint with two fields. And the build keeps
failing: "Schema text failed"
Any idea?

Thanks

public class LiteralText extends BaseObject {
...
 /**
* @hibernate.id generator-class="native" type="java.lang.Long" column="id"
  * @return the id
  */
 public Long getId() {
  return this.id;
 }
 /**
* @hibernate.many-to-one cascade="none" not-null="true" column="app_id"
  *                        class="com.appfuse.model.WebApplication"
  * @hibernate.column name="app_id" unique-key="IDX_LITERAL_APP_UNIQUE"
  *
  */
 public WebApplication getWebApp() {
  return this.webApp;
 }
 /**
* @hibernate.property column="literal_key" length="150" not-null="true" * @hibernate.column name="literal_key" unique-key="IDX_LITERAL_APP_UNIQUE"
  */
 public String getLiteralKey() {
  return this.literalKey;
 }

}
public class WebApplication extends BaseObject {
...
 /**
  * @return Returns the items.
  *
  * @hibernate.bag lazy="false"
  *                cascade="all-delete-orphan"
  * @hibernate.collection-key column="app_id"
* @hibernate.collection-one-to-many class="com.aparapar.model.LiteralText"
  */
 public List<LiteralText> getLiterals() {
  return this.literals;
 }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to