I got a little problem with a hibernate mapping file.
Here the java files:
Java Code:
public class User {
    private String name;
    private int id;
    private String username;
    private String password;
//And Getters/Setters
Java Code:
public class Kasten {
    private String Kastenname;
    private int KastenID;
    private User user;
Java Code:
public class Archiv {
    private Kasten kasten;
    private int f1;
    private int f2;
    private int archiv_ID;
And now I don't exactly know how to write the .xml mapping file for archiv because of the two foreign keys I get from "Kasten".
Here is the archiv-table how it will be stored in the database:
Java Code:
    archiv_id integer NOT NULL,
    f1 integer,
    f2 integer,
    KastenID integer NOT NULL,
    UserID integer NOT NULL,
    PRIMARY KEY(archiv_id),
    FOREIGN KEY(KastenID, UserID) REFERENCES Kasten(KastenID, UserID)
Till now I got for the mapping file something like this:

Java Code:
    <class name="files.Archiv" table="Archiv">
    <id name="archiv_ID" type="int">
        <generator class="increment" />
        <many-to-one name="kasten" column="kastenid" class=files.Kasten" not-null="true" cascade="all" unique="true" />
        <property name="f1" type="int" />
        <property name="f2" type="int" />
Does anybody know how write it?