Member model sequence annotation modify

This commit is contained in:
geek 2017-07-28 17:13:25 +09:00
parent d6db2beddc
commit fa20746ab1
3 changed files with 7 additions and 5 deletions

View File

@ -29,7 +29,8 @@ public class Member {
}
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
@GeneratedValue(strategy= GenerationType.AUTO, generator = "MEMBER_ID_SEQ")
@SequenceGenerator(name = "MEMBER_ID_SEQ", sequenceName = "MEMBER_ID_SEQ", allocationSize = 1)
public long getId() {
return id;
}

View File

@ -380,10 +380,10 @@ INSERT INTO public.meta_vendor_crawler (id,create_date,crawler_id,vendor_id) VAL
INSERT INTO public."member" (id,company_name,create_date,email,"name",phone,pw,status_id) VALUES (
1,'loafle','2017-06-26 11:07:27.625','overflow@loafle.com','overFlow','000-000-0000','qwer5795',2);
nextval('member_id_seq'),'loafle','2017-06-26 11:07:27.625','overflow@loafle.com','overFlow','000-000-0000','qwer5795',2);
INSERT INTO public."member" (id,company_name,create_date,email,"name",phone,pw,status_id) VALUES (
2,'loafle','2017-06-26 11:07:27.625','geek@loafle.com','geek','000-000-0000','qwer5795',1);
nextval('member_id_seq'),'loafle','2017-06-26 11:07:27.625','geek@loafle.com','geek','000-000-0000','qwer5795',1);
INSERT INTO public.email_auth (auth_confirm_date,create_date,email_auth_key,member_id) VALUES (
NULL,'2017-06-26 15:28:48.895','dbseogns1234',1);

View File

@ -24,7 +24,7 @@ public class MemberDAOTest {
@Autowired
private MemberDAO repo;
@Ignore
// @Ignore
@Test
public void createMember() {
Member m = new Member();
@ -34,7 +34,8 @@ public class MemberDAOTest {
m.setPw("bbbbbbbbb");
m.setPhone("000-000-0000");
m.setEmail("insanity111@loafle.com");
m.setStatus(new MetaMemberStatus((short)1));
m.setStatus(new MetaMemberStatus((short)3));
repo.save(m);
}