On Saturday, August 30, 2014 4:49:50 PM UTC-7, Marcio Andrey Oliveira wrote: > > Hi, all. > > I started to learn Play! Framework and I'm using Ebean. > > I'm having some problems to make my models be the way I want. > > I'm trying to model the following: A user may have sent many invites. > > My model Invites contains the field sender defined as > > // Invites.java > > @Constraints.Required > @Formats.NonEmpty > @ManyToOne(cascade=CascadeType.ALL) > @Column(nullable=false) > public User sender; > > > The problem is that Ebean is not forcing the sender to be not null (as we > can see below in the excerpt of migration file) > > //conf/evolutions/default/1.sql > > create table Invites ( > id bigint not null, > *sender_id bigint,* // I expected a *not null* here > to_email varchar(255) not null, > ... > > I looked for an answer on Google but I failed to find it. > > Does anyone can tell me what am I doing wrong? >
What you are doing wrong is posting in the wrong form. This is for Sequel, the ruby database library, it has nothing to do with Ebean. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
