Index: modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/ProfileTest.java
===================================================================
--- modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/ProfileTest.java	(revision 46704)
+++ modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/ProfileTest.java	(revision 46705)
@@ -80,7 +80,6 @@
 
         rs = sm.search(SearchManager.TYPE.PUBLISHER,"EDP Sciences");
         Publisher pub = (Publisher)rs.get(0);
-        //pub.setContact(user);
         user.setPublisher(pub);
 
         try {
@@ -93,6 +92,15 @@
     @Test
     @Transactional
     @Rollback(true)
+    public void activateUser() throws IOException {
+        um.activateUser("pkanakakis@di.uoa.gr");
+    }
+
+
+
+    @Test
+    @Transactional
+    @Rollback(true)
     public void eligibleProjectsByOrganization(){
         List<Project> pr = pm.getEligibleProjectsForOrganization("corda::983580389");
         for(Project p : pr)
Index: modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/ManageRequestsTest.java
===================================================================
--- modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/ManageRequestsTest.java	(revision 46704)
+++ modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/ManageRequestsTest.java	(revision 46705)
@@ -98,7 +98,6 @@
     public void resolveDOI() {
         try {
             Publication p = pum.resolveDOI("10.1007/978-3-319-33349-6");
-            System.out.println(p.getId());
         } catch (ManagerException e) {
             e.printStackTrace();
         }
Index: modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/UserDAO.java
===================================================================
--- modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/UserDAO.java	(revision 46704)
+++ modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/UserDAO.java	(revision 46705)
@@ -130,12 +130,14 @@
     public void saveUser(final User user) {
         User u = getUserByEmail(user.getEmail());
         if (u != null) {
-            if (!user.getPassword().equals(u.getPassword()))
+            if(u.getPublisher() != null)
+                user.setPublisher(u.getPublisher());
+            if(user.getPassword() == null)
+                user.setPassword(u.getPassword());
+            if (user.getPassword() != null && !user.getPassword().equals(u.getPassword()))
                 user.setPassword(DigestUtils.md5Hex(user.getPassword()));
-            if(u.isActive()){
-                log.debug("user is active -> " + u.isActive());
+            if(u.isActive())
                 user.setActive(true);
-            }
             User user_merged = (User) getSession().merge(user);
         }else
             persist(user);
Index: modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/JournalDAO.java
===================================================================
--- modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/JournalDAO.java	(revision 46704)
+++ modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/JournalDAO.java	(revision 46705)
@@ -35,6 +35,7 @@
 
 	@SuppressWarnings("unchecked")
 	public Journal getJournal(String id) {
+
 		List<Journal> rs = createEntityCriteria().add(Restrictions.eq("id",id)).list();
 		if(rs.isEmpty())
 			return null;
Index: modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/PublicationManagerImpl.java
===================================================================
--- modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/PublicationManagerImpl.java	(revision 46704)
+++ modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/PublicationManagerImpl.java	(revision 46705)
@@ -139,6 +139,7 @@
 		Publication publication = new Publication();
 		InputStream is = null;
 
+
 		try {
 			is = new URL("http://api.crossref.org/works/" + doi).openStream();
 			ObjectMapper mapper = new ObjectMapper();
@@ -162,11 +163,11 @@
 				publication.setDate(this.parsePublicationDate(root.path("message").path("issued")));
 				publication.setJournal(this.parseJournal(root.path("message").path("container-title"), root.path("message").path("ISSN")));
 				publication.getJournal().setPublisher(this.parsePublisher(root.path("message").path("publisher")));
-
-				/*publication.setAffiliations(new ArrayList<Affiliation>());
+				System.out.println("get");
+				publication.setAuthors(new ArrayList<Author>());
 				for (JsonNode author : root.path("message").path("author")) {
-					publication.getAffiliations().add(this.parseAffiliation(author));
-				}*/
+					publication.getAuthors().add(this.parseAffiliation(author));
+				}
 
 				publication.setLicense(root.path("message").path("license").path(0).path("URL").textValue());
 
@@ -191,8 +192,8 @@
 		return publication;
 	}
 
-	private Affiliation parseAffiliation(JsonNode author) {
-		User user = new User();
+	private Author parseAffiliation(JsonNode author) {
+		/*User user = new User();
 		user.setFirstname(author.path("given").textValue());
 		user.setLastname(author.path("family").textValue());
 		user.setAffiliations(new ArrayList<Affiliation>());
@@ -199,7 +200,15 @@
 
 		Affiliation af = new Affiliation();
 		user.getAffiliations().add(af);
-		return af;
+		return af;*/
+
+		Author a = new Author();
+		a.setFirstname(author.path("given").textValue());
+		a.setLastname(author.path("family").textValue());
+		return a;
+
+
+
 	}
 
 	private Publisher parsePublisher(JsonNode publisherName) {
@@ -206,14 +215,10 @@
 		Publisher publisher = new Publisher();
 
 		publisher.setName(publisherName.textValue());
-
-		/*publisher.setBank_address(publisherManager.getBankAddress().toString());
-		publisher.setBank_holder(null);
-		publisher.setBank_iban(null);
-		publisher.setBank_name(null);*/
-		
-		publisher.setBankAccount(new BankAccount());
-
+		System.out.println("set");
+		publisher.setBankAccount(new BankAccount(null,publisherManager.getBankAddress().toString(),
+				null,null,null));
+		System.out.println("set");
 		publisher.setId("crossref::" + DigestUtils.md5Hex(publisher.getName()));
 		publisher.setSource("crossref");
 
@@ -245,6 +250,7 @@
 			journal.setSource("crossref");
 			journal.setId("crossref::" + DigestUtils.md5Hex(journal.getTitle()));
 		}
+
 		return journal;
 	}
 
Index: modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/JournalManagerImpl.java
===================================================================
--- modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/JournalManagerImpl.java	(revision 46704)
+++ modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/JournalManagerImpl.java	(revision 46705)
@@ -43,6 +43,7 @@
 	public Journal getJournalByTitle(String title) {
 		try {
 			Journal journal = journalDAO.getJournalByTitle(title);
+
 			if (journal != null && journal.getPublisher() != null)
 				journal.setPublisher(publisherDAO.getPublisher(journal.getPublisher().getId()));
 
Index: modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/User.java
===================================================================
--- modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/User.java	(revision 46704)
+++ modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/User.java	(revision 46705)
@@ -46,7 +46,8 @@
 					nullable = false, updatable = false) })
 	private List<Affiliation> affiliations = new ArrayList<>();
 
-	@OneToOne(mappedBy="contact",cascade=CascadeType.ALL,fetch = FetchType.LAZY)
+	@OneToOne
+	@JoinColumn(name = "publisher")
 	private Publisher publisher;
 
 	@OneToMany(mappedBy = "pk.user", cascade=CascadeType.ALL,fetch = FetchType.LAZY)
Index: modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Publisher.java
===================================================================
--- modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Publisher.java	(revision 46704)
+++ modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Publisher.java	(revision 46705)
@@ -13,45 +13,35 @@
 public class Publisher implements Serializable {
 	private static final long serialVersionUID = 1L;
 
+	@Id
+	@Column(columnDefinition = "text")
+	private String id;
+	@Column(columnDefinition = "float default 0")
 	private float apc;
 	@Column(columnDefinition = "float default 0")
 	private double discount;
 	@Column(columnDefinition = "text")
 	private String email;
-	@Id
 	@Column(columnDefinition = "text")
-	private String id;
-	@Column(columnDefinition = "text")
 	private String name;
 	@Column(columnDefinition = "text")
 	private String source;
+	@Basic
+	@Convert( converter=CurrencyConverter.class )
+	private Currency apcCurrency;
 
-	/*@Column(columnDefinition = "text")
-	private String bank_name;
-	@Column(columnDefinition = "text")
-	private String bank_address;
-	@Column(columnDefinition = "text")
-	private String bank_iban;
-	@Column(columnDefinition = "text")
-	private String bank_holder;*/
 	@OneToOne
 	@JoinColumn(name = "bankAccount")
 	private BankAccount bankAccount;
 
-	@Basic
-	@Convert( converter=CurrencyConverter.class )
-	private Currency apcCurrency;
-
 	@OneToMany(mappedBy = "pk.publisher", cascade=CascadeType.ALL,fetch = FetchType.LAZY)
 	@JsonBackReference
 	private List<PublisherDiscount> publisherDiscount = new ArrayList<>();
 
-	@OneToOne
-	@JoinColumn(name = "contact")
-	@JsonBackReference(value="contact")
+	@OneToOne(mappedBy="publisher",cascade=CascadeType.ALL)
+	@JsonBackReference(value = "contact")
 	private User contact;
 
-
 	@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
 	@JoinTable(name = "organization_publisher",  joinColumns = {
 			@JoinColumn(name = "publisher", nullable = false, updatable = false)},
@@ -62,39 +52,6 @@
 
 	public Publisher() {}
 
-
-	/*public String getBank_name() {
-		return bank_name;
-	}
-
-	public void setBank_name(String bank_name) {
-		this.bank_name = bank_name;
-	}
-
-	public String getBank_address() {
-		return bank_address;
-	}
-
-	public void setBank_address(String bank_address) {
-		this.bank_address = bank_address;
-	}
-
-	public String getBank_iban() {
-		return bank_iban;
-	}
-
-	public void setBank_iban(String bank_iban) {
-		this.bank_iban = bank_iban;
-	}
-
-	public String getBank_holder() {
-		return bank_holder;
-	}
-
-	public void setBank_holder(String bank_holder) {
-		this.bank_holder = bank_holder;
-	}
-*/
 	public float getApc() {
 		return this.apc;
 	}
Index: modules/uoa-goldoa-service/branches/hibernate/src/main/resources/hibernate.cfg.xml
===================================================================
--- modules/uoa-goldoa-service/branches/hibernate/src/main/resources/hibernate.cfg.xml	(revision 46704)
+++ modules/uoa-goldoa-service/branches/hibernate/src/main/resources/hibernate.cfg.xml	(revision 46705)
@@ -7,7 +7,7 @@
 
 <hibernate-configuration>
     <session-factory>
-        <property name="hibernate.hbm2ddl.auto">update</property>
+        <property name="hibernate.hbm2ddl.auto">create</property>
 		<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQL9Dialect</property>
         <property name="show_sql">true</property>	
        	<property name="connection.pool_size">1</property>
