hiiiibernateee

another set of points

-ran into trouble trying to get hibernate to check my 2nd entity that is referencing the first one. the mysql create broke on the wrong innodb syntax noted before. and could not just leave the second one in as i wanted to reference the first one. solution. org.hibernate.dialect.MySQL5InnoDBDialect is a correct dialect to create innodb tables correctly. note the “5” in the middle. and search the hibernate reference manual for “mysql5”. nothing found, wheehee but it works.

-how do i reference an entity from another entity and have jpa persist it? value reference bm but not the other way around. solution. name the reference in value as @ManyToOne (several values can refer to the same bm). leave out @Column since it will be named same as the @Id in bm. uu yea seems to generate a sensible table at least..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s