ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Grabfelder <nos...@kinokai.de>
Subject Re: Can't delete without the setter method
Date Thu, 04 Dec 2008 20:49:05 GMT
hm looks like a bug to me. What happens when you perform the delete? Just nothing or an exception?

Regards

Kai


--- Original Nachricht ---
Absender: Michael He
Datum: 03.12.2008 15:56
> 
> if i don't set the setter method of the keyword-column property in a
> javabean,then i can't delete it using this property?
>  
> for example:
> 
> the javabean:
> public class JobPosting implements Serializable {
> 	private int jobPostingId;
> 	//missing other properties...
>             ...
> 	public int getJobPostingId() {
> 		return jobPostingId;
> 	}//only the getter method
>              //missing other getter/setter methods
>              ...
> }
> 
> the xml:
> <delete id="deleteJobPosting" parameterClass="JobPosting">
> 	   delete from jobPosting where jobPostingId=#jobPostingId#
> </delete>
> 
> the java code:
> public void deleteJobPosting(JobPosting j) {
> 		getSqlMapClientTemplate().delete("deleteJobPosting", j);
> 	}
> 
> i have tested it can't be deleted in this case,there is also no error
> messages,but i can  insert with the same model, anyone knows why?
> 
> thanks in advance


Mime
View raw message