the 4th problem, same like the 2nd problem:
the auto-created POJO:
| package eu.cleversoft.infonds.ejb3.entities;
| import javax.persistence.Embeddable;
| import javax.persistence.ManyToOne;
|
| (Does JBossAS4.0.3SP1 support not @Embeddable? Because If i correct it here
@[EMAIL PROTECTED](name="infonds_zahlung")), it then runs in JBossAS wenn i
deploy it)
|
| @Embeddable
| public class InfondsZahlung implements java.io.Serializable {
|
| // Fields (Here should be more than 2 fields created)
| private InfondsAbrechnung abrechnung;
| private InfondsKonto konto;
|
| // Constructors
|
| /** default constructor */
| public InfondsZahlung() {
| }
|
| /** full constructor */
| public InfondsZahlung(InfondsAbrechnung abrechnung, InfondsKonto konto)
{
| this.abrechnung = abrechnung;
| this.konto = konto;
| }
|
| // Property accessors
| @ManyToOne(cascade={$pojo.getCascadeType($property)},
| fetch=$pojo.getFetchType($property))
| $pojo.getHibernateCascadeTypeAnnotation($property)
| $pojo.generateJoinColumnsAnnotation($property)
|
| public InfondsAbrechnung getAbrechnung() {
| return this.abrechnung;
| }
|
| public void setAbrechnung(InfondsAbrechnung abrechnung) {
| this.abrechnung = abrechnung;
| }
| @ManyToOne(cascade={$pojo.getCascadeType($property)},
| fetch=$pojo.getFetchType($property))
| $pojo.getHibernateCascadeTypeAnnotation($property)
| $pojo.generateJoinColumnsAnnotation($property)
|
| public InfondsKonto getKonto() {
| return this.konto;
| }
|
| public void setKonto(InfondsKonto konto) {
| this.konto = konto;
| }
| }
|
the used hbm.xml file:
| <?xml version="1.0"?>
| <!DOCTYPE hibernate-mapping SYSTEM
"file:D:/eclipse/eclipse_3.1.1_jboss_dali/workspace/infonds_hibernate/db/dtd/hibernate-mapping-3.0.dtd">
| <hibernate-mapping package="eu.cleversoft.infonds.ejb3.entities">
| <class name="InfondsZahlung" table="infonds_zahlung">
| <meta attribute="implement-equals">true</meta>
| <meta attribute="class-description">
| Die tatsaechlichen Zahlungen an Vertriebspartner
| @author Florian Clever
| </meta>
| <id name="zahlungId" column="zahlung_id"
type="java.lang.Integer">
| <generator class="native"/>
| </id>
| <many-to-one name="abrechnung"
class="eu.cleversoft.infonds.ejb3.entities.InfondsAbrechnung"
column="abrechnung_id" not-null="true"/>
| <many-to-one name="partner"
class="eu.cleversoft.infonds.ejb3.entities.InfondsPartner" column="partner_id"
not-null="true">
| <meta attribute="field-description">
| Redundant da über Konto gegeben.
| </meta>
| </many-to-one>
| <many-to-one name="konto"
class="eu.cleversoft.infonds.ejb3.entities.InfondsKonto" column="konto_id"
not-null="true">
| <meta attribute="field-description"/>
| </many-to-one>
| <property name="betrag" column="betrag" type="java.lang.Double"
not-null="true">
| <meta attribute="field-description">
| Der in dieser Abrechnung enthaltene Zahlbetrag in Euro.
| </meta>
| </property>
| <property name="betragGezahlt" column="betrag_gezahlt"
type="java.lang.Double" not-null="true">
| <meta attribute="field-description">
| Der insgesamt bereits gezahlte Betrag zum Zeitpunkt der
Ueberweisungserstellung.
| </meta>
| </property>
| <property name="betragZahlschuldGesamt"
column="betrag_zahlschuld_gesamt" type="java.lang.Double" not-null="true">
| <meta attribute="field-description">
| Der aus allen bisherigen Abrechnungen inklusiver dieser hier
und Ueberweisungen zu zahlende Betrag in diesem Jahr.
| </meta>
| </property>
| <property name="betragNochZuZahlen"
column="betrag_noch_zu_zahlen" type="java.lang.Double" not-null="true">
| <meta attribute="field-description">
| Netto noch zu zahlender Betrag.
| Der aus allen bisherigen Abrechnungen inklusiver dieser hier
und Ueberweisungen noch zu zahlende Betrag in diesem Jahr.
| </meta>
| </property>
| <property name="generiertAm" column="generiert_am"
type="java.util.Date">
| <meta attribute="field-description">
| Wird verwendet um zu identifizieren welche Saetze nicht
geupdatet wurden und somit rausgeschmissen werden.
| </meta>
| </property>
| <property name="gutschriftNr" column="gutschrift_nr"
type="java.lang.Integer">
| <meta attribute="field-description">
| Die Gutschriftnr.
| </meta>
| </property>
| <property name="rechnungNr" column="rechnung_nr"
type="java.lang.String">
| <meta attribute="field-description">
| Die Rechnungsnr. Falls gesetzt darf die Gutschriftnr nicht
gesetzt werden.
| Die Rechnungsnr. wird gesetzt wenn VPs eine Rechnung stellen.
| </meta>
| </property>
| <properties name="abrechnungKontoJoinField">
| <many-to-one name="abrechnung" insert="false"
update="false" column="abrechnung_id"
class="eu.cleversoft.infonds.ejb3.entities.InfondsAbrechnung"/>
| <many-to-one name="konto" insert="false" update="false"
column="konto_id" class="eu.cleversoft.infonds.ejb3.entities.InfondsKonto"/>
| </properties>
| <many-to-one name="ueberweisung"
class="eu.cleversoft.infonds.ejb3.entities.InfondsUeberweisung"
column="ueberweisung_id" not-null="false" not-found="ignore">
| <meta attribute="field-description">
| Falls Ueberweisungen erstellt wurden, werden diese hier
referenziert.
| </meta>
| </many-to-one>
| <set name="fundsZahlungen" cascade="all-delete-orphan">
| <key column="zahlung_id"/>
| <one-to-many class="InfondsZahlungFunds"/>
| </set>
| </class>
| </hibernate-mapping>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922441#3922441
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922441
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user