O'Reilly logo

Railo 3 Beginner’s Guide by Mark Drew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - creating our user model object

The User object in our application will need a few properties for us to work with, for example, a username, user e-mail address, and password.

  1. Let's create a folder named model in our videoshare directory; this is where all our model objects are going to be stored so that they are out of the way, and we can easily tell where they are.
  2. In the model folder, create a file named User.cfc and add the following content:
    component persistent="true"{
    property name="id" fieldtype="id" ormtype="int" generator="increment";
    property name="email";
    property name="password";
    property name="username";
    }
    
  3. In the previous code, we see that we have used the persistent="true" property; this alerts the ORM in Railo Server ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required