Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3 
Problems with Session and transaction handling?
Read this: 
http://hibernate.org/42.html
Hi,
I've just started trying to develop a new part of our application in hibernate..
I'd quite like to have a many-to-one mapping in which the reference is just an ID (integer/String) rather than a full blown object..is there any way this is possible?
for example, I have a class Script, and a class State..I want each State object to have a reference to the 
id of a Script object, rather than a reference to a Script object itself...is this do-able?
Code:
public class Script {
     private long id;
     private String name;
     private String code;
     //getters and setters
}
public class State {
    private long scriptId;
    private String [] outputs;
    //getters and setters
}
Many thanks,
Rohit