-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Don´t Close Issue] FAQ - Cosas que vamos a poder necesitar de ahora en adelante #48
Comments
Anotaciones de Entidades @entity |
@access(AccesType.PROPERTY) > Le decimos a spring que vamos a utilizar los getters y setters. @Inheritance > Herencia @id > Identificador en la BBDD @Version > Actualizaciones de esa entidad por versión Cuando redefinimos el equals, el hashcode también. @embeddable > Clase embebible. Los atributos se van a meter en la tabla. @ElementCollection > IMPORTANTE ponerlo si hacemos un collection de datatypes @OneToMany
Composicion > Recordar el ejemplo del ordenador (Para existir un objeto ordenador tiene que existir todos sus componentes) mappedBy > Poner en una de las dos relaciones Unique > @column(unique = true) @TeMPOraL(TemporalType.TIMESTAMP) > Para fechas
@transient > Atributos derivados que no queremos persistir. Con funciones de agregacion (count, match...) > groupBy en la query JPQL |
FIJAROS QUE LA TABLA DE LA SENTENCIA JPQL ESTA ESCRITA CON EL NOMBRE DE LA CLASE JAVA, NO CON EL NOMBRE Y EL FORMATO QUE SE REGISTRA EN MYSQL.
|
Script MySQLdrop database if exists create user 'acme-manager'@'%' grant select, insert, update, delete |
El @Autowired se coloca a cada servicio que llamemos |
No colocar ningun toString en las entidades. Provoca StackOverFlow a la hora de cargar el PopulateDatabase |
Si un formulario falla, comprobar que tiene el <form:hidden ... > |
Usar placeholders |
Fechas en SpringADVERTENCIA: VER ESTA ISSUE EN MODO EDICION Paso 2. <form:label path=""> |
El atributo del formulario: modelAttribute = "announcement" El nombre de la variable que le pasamos al metodo controlador: @Valid Announcement announcement Tienen que llamarse igual para que la validación en formulario funcione |
Pagina util para realizar patterns |
Dadle a editar issue para ver como escribir los caracteres.
Para notacion XML
" "
' '
< <
The text was updated successfully, but these errors were encountered: