Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 692 Bytes

Development Log.md

File metadata and controls

19 lines (16 loc) · 692 Bytes

Development Log

error:object references an unsaved transient instance - save the transient instance before flushing: one.whr.simple.entity.Role

this is because when saveing new users, I didn't retrieve role from db, instead i created a new instance of role:

roleSet.add(new Role(EnumRole.ROLE_USER));

correction:

 Role userRole = roleRepository.findByName(EnumRole.ROLE_USER)
                .orElseThrow(() -> new RuntimeException("Error: Role is not found."));
        roleSet.add(userRole);

Http-Only is secure

when svaing content, receiving Data truncation: Data too long for column 'content' at row 1 => change content from string to BLOB byte[]