<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Últimas mensagens do tópico "Movimento caixa em Java com hibernate, mysql e JSF"]]></title>
		<link>http://www.guj.com.br/posts/list/22.java</link>
		<description><![CDATA[Últimas mensagens enviadas no tópico "Movimento caixa em Java com hibernate, mysql e JSF"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ Olá pessoal, td bem??<br /> <br /> Estou tentando desenvolver um sistema web com um movimento caixa... o problema é que nunca usei expressões matemáticas e nunca criei nada do tipo... to meio perdido e precisando de ajuda...<br /> <br /> bom, eu já comecei idealizando que eu devo ter 2 tabelas: movimentacaoFinanceira e lancamento<br /> <br /> eu acho tb, que na tabela de movimentacaofinanceira devem haver os seguintes campos (vou colocar em java pra ver se facilita pra eu entender as posteriores explicacoes):<br /> [code]@Entity<br /> @Table(name = "movimento")<br /> public class MovimentoFinanceiro {<br /> <br /> 	@Id<br /> 	@GeneratedValue<br /> 	@Column(name = "id_movimentofinanceiro")<br /> 	private Long id;<br /> <br /> 	@Column(name = "data_movimento")<br /> 	private Date data_movimento;<br /> <br /> 	@OneToMany(mappedBy = "movimento", fetch = FetchType.LAZY)<br /> 	@Cascade(org.hibernate.annotations.CascadeType.ALL)<br /> 	private List&lt;Lancamento&gt; lancamentos = new ArrayList&lt;Lancamento&gt;();<br /> <br /> 	//deveria ter alguma variavel para receber um cálculo aqui???<br /> 	[/code]<br /> <br /> e na tabela de lancamento:<br /> [code]@Entity<br /> @Table(name = "lancamento")<br /> public class Lancamento {<br /> <br /> 	@Id<br /> 	@GeneratedValue<br /> 	@Column(name = "id_lancamento")<br /> 	private Long id;<br /> <br /> 	@Column(name = "descricao")<br /> 	private String descricao;<br /> <br /> 	@Column(name = "valor")<br /> 	private Double valor;<br /> <br /> 	@Column(name = "tipo_entrada")<br /> 	private Boolean tipo_entrada;<br /> <br /> 	@Column(name = "tipo_saida")<br /> 	private Boolean tipo_saida;<br /> <br /> 	@ManyToOne(cascade = javax.persistence.CascadeType.ALL)<br /> 	@JoinColumn(name = "id_movimento")<br /> 	private MovimentoFinanceiro movimentofinanceiro;[/code]<br /> <br /> Ae pessoal, empaquei aqui.... alguma sugestão?? Acho q é uma dúvida comum para a maioria dos iniciantes em java...<br /> <br /> Flws pessoal!!!<br /> Jesus é o Senhor!!!]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/985466/movimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/985466/movimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Wed, 27 Jan 2010 21:00:24]]> GMT</pubDate>
				<author><![CDATA[ Kleber-rr]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ Bem, acho que seria uma boa você dar uma breve "aula" sobre movimento caixa, pois não tenho a menor idéia da teoria envolvida aí, rsrs... daí sim podemos tentar ajudar em alguma coisa...  <img src="http://www.guj.com.br/images/smilies/283a16da79f3aa23fe1025c96295f04f.gif" border="0"> ]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/985718/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/985718/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Thu, 28 Jan 2010 11:11:23]]> GMT</pubDate>
				<author><![CDATA[ marcelo.bellissimo]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ [quote=marcelo.bellissimo]Bem, acho que seria uma boa você dar uma breve "aula" sobre movimento caixa, pois não tenho a menor idéia da teoria envolvida aí, rsrs... daí sim podemos tentar ajudar em alguma coisa...  <img src="http://www.guj.com.br/images/smilies/283a16da79f3aa23fe1025c96295f04f.gif" border="0"> [/quote]<br /> <br /> PO marcelao, blz!!! vamos a aula!!! <img src="http://www.guj.com.br/images/smilies/69934afc394145350659cd7add244ca9.gif" border="0"><br /> <br /> o movimento caixa nada mais é do que uma simples movimentaçao financeira diária de uma empresa. por exemplo uma tabela com as seguintes colunas e exemplos:<br /> <br /> ITEM  |  DESCRICAO MOVIMENTO          |  ENTRADA   |   SAÍDA   |   SALDO PARCIAL<br /> ========================================================<br /> 1       | RECEBIMENTO PGTO CLIENTE     | 3.000,00     |      -        | 3.000,00<br /> 2       | PAGAMENTO DE ENERGIA ELETR  |      -           |  500,00   | 2.500,00<br /> 3       | PAGAMENTO FUNCIONARIO         |      -           | 1.000,00 | 1.500,00<br /> 4       | RECEBIMENTO PGTO CLIENTE     | 5.000,00     |      -       | 6.500,00<br /> SALDO FINAL =================================| 6.500,00<br /> <br /> Seria mais ou menos isso, dá pra entender a lógica??<br /> <br /> Valeu amigao.]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/985751/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/985751/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Thu, 28 Jan 2010 11:31:06]]> GMT</pubDate>
				<author><![CDATA[ Kleber-rr]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ E voce gostaria de ter um atributo que seria o "saldo", correto?<br /> <br /> Voce pode utilizar a annotation @Formula() e como parâmetro passar um SQL fazendo a soma dos valores de entrada e saída, pra depois subtrair e tirar o saldo. Algo como:<br /> <br /> [code]@Formula(" ( (select sum(valor) from Lancamento where tipo_entrada=true) - (select sum(valor) from Lancamento where tipo_saida=true) ) ")<br /> private Double saldo;[/code]<br /> <br /> Algo assim...]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/985792/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/985792/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Thu, 28 Jan 2010 12:01:36]]> GMT</pubDate>
				<author><![CDATA[ marcelo.bellissimo]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ [quote=marcelo.bellissimo]E voce gostaria de ter um atributo que seria o "saldo", correto?<br /> <br /> Voce pode utilizar a annotation @Formula() e como parâmetro passar um SQL fazendo a soma dos valores de entrada e saída, pra depois subtrair e tirar o saldo. Algo como:<br /> <br /> [code]@Formula(" ( (select sum(valor) from Lancamento where tipo_entrada=true) - (select sum(valor) from Lancamento where tipo_saida=true) ) ")<br /> private Double saldo;[/code]<br /> <br /> Algo assim...[/quote]<br /> <br /> Isso mano, é uma parada mais ou menos essa mesmo q preciso!! Vou testar e te falo depois.<br /> <br /> Valeu]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/992333/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/992333/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Mon, 8 Feb 2010 23:49:44]]> GMT</pubDate>
				<author><![CDATA[ Kleber-rr]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ No caso, como eu mudei os tipos booleans da classe, passei para string para usar o radio buton, ficou assim:<br /> [code]@Column(name = "saldo")<br /> 	@Formula(" ( (select sum(valor) from lancamento where tipolancamento=Entrada) - (select sum(valor) from lancamento where tipolancamento=Saida) ) ")<br /> 	private Double saldo;[/code]<br /> Mas, deu esse erro:<br /> [code]Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'this_.valor' in 'field list'<br /> 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)<br /> 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)<br /> 	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)<br /> 	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)<br /> 	at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)<br /> 	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)<br /> 	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1448)<br /> 	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)<br /> 	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)<br /> 	at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)<br /> 	at org.hibernate.loader.Loader.doQuery(Loader.java:674)<br /> 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)<br /> 	at org.hibernate.loader.Loader.doList(Loader.java:2220)<br /> [/code]<br /> <br /> Se precisar q eu poste a classe é só falar.<br /> <br /> Valeu.]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/992337/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/992337/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Tue, 9 Feb 2010 00:08:48]]> GMT</pubDate>
				<author><![CDATA[ Kleber-rr]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ [code]Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'this_.valor' in 'field list'[/code]<br /> <br /> Kleber, só uma crítica, positiva... o erro aqui está bem claro, mas pelo jeito você não soube interpretar ou ler o erro, talvez por não saber ler muito bem em inglês, creio eu... fica uma dica, estude bastante, faça um cursinho, pois nessa área tem que manjar mesmo de inglês... <br /> <br /> Mas vamos lá, o erro diz que a coluna mapeada pelo atributo "valor"  (this_.valor) é desconhecida (unknown)... verifique o seu mapeamento, e certifique-se de que esse campo realmente exista na tabela...<br /> <br /> Ah, outra coisa, o HQL, que você está usando, é case sensitive até onde eu me lembro, então preste muita atenção nos nomes que você usa na Query... "lancamento" , "tipolancamento", "valor"... esses nomes devem "bater" com os nomes dos atributos mapeados na sua classe... tenho quase certeza que o "lancamento" vai dar pau, pois sua classe deve se chamar "Lancamento" com L maiusculo se você seguiu as convenções do Java... mas testa aí e fala o resultado !  :thumbup: ]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/992405/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/992405/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Tue, 9 Feb 2010 09:11:30]]> GMT</pubDate>
				<author><![CDATA[ marcelo.bellissimo]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ [quote=marcelo.bellissimo][code]Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'this_.valor' in 'field list'[/code]<br /> <br /> Kleber, só uma crítica, positiva... o erro aqui está bem claro, mas pelo jeito você não soube interpretar ou ler o erro, talvez por não saber ler muito bem em inglês, creio eu... fica uma dica, estude bastante, faça um cursinho, pois nessa área tem que manjar mesmo de inglês... <br /> <br /> Mas vamos lá, o erro diz que a coluna mapeada pelo atributo "valor"  (this_.valor) é desconhecida (unknown)... verifique o seu mapeamento, e certifique-se de que esse campo realmente exista na tabela...<br /> <br /> Ah, outra coisa, o HQL, que você está usando, é case sensitive até onde eu me lembro, então preste muita atenção nos nomes que você usa na Query... "lancamento" , "tipolancamento", "valor"... esses nomes devem "bater" com os nomes dos atributos mapeados na sua classe... tenho quase certeza que o "lancamento" vai dar pau, pois sua classe deve se chamar "Lancamento" com L maiusculo se você seguiu as convenções do Java... mas testa aí e fala o resultado !  :thumbup: [/quote]<br /> <br /> Marcelão, obrigado pela dica... mas eu já tinha verificado esse erro... e sim, meu inglês técnico é razoavel. Dá pra desenrrolar... antes de postar isso, eu verifiquei esse campo na minha tabela e ele existe. Também verifiquei o caso do Case Sensitive, tanto q o que o colega postou estava com a primeira letra em maiúscula e eu fiz as correçoes necessárias... verifiquei tb que na minha tabela financeiro, apesar de ter o atributo:<br /> [code]private Double saldo;[/code]<br /> o referido campo não foi criado na tabela ao rodar o geraTabela..., aí tive de criar manualmente, mas mesmo assim o erro persiste...<br /> <br /> Agradeço as dicas e as críticas positivas. <br /> <br /> Flws.]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/992468/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/992468/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Tue, 9 Feb 2010 10:17:38]]> GMT</pubDate>
				<author><![CDATA[ Kleber-rr]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ Bom pessoal, descobri o pq do ultimo erro q postei: <br /> A anotação @Formula estava retirando o campo Double "saldo" da minha tabela. Então, eu tirei a anotação e testei o SQL no phpmyadmin, pra ver se estava ok.<br /> <br /> A consulta:<br /> [code]SELECT sum(valor) FROM `lancamento` WHERE tipolancamento='entrada'[/code]<br /> Funciona perfeitamente, já a consulta recomendada pelo amigo marcelo, não funcionou...<br /> Olhei na net em vários sites, e a consulta sugerida pelo colega parece estar correta... estou tentando achar na documentação do MySQL a origem do erro, <br /> [code]SELECT sum(valor) FROM `lancamento` WHERE tipolancamento='entrada' - SELECT sum(valor) FROM `lancamento` WHERE tipolancamento='saida'[/code]<br /> O erro que me aparece de síntese é esse:<br /> [code]#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT sum(valor) FROM `lancamento` WHERE tipolancamento='saida'' at line 1[/code]<br /> <br /> Ainda estou lendo sobre o erro... mas se algum colegar puder apontá-lo, agradeço.<br />  <br /> Ótimo feriadão a todos!!]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/995432/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/995432/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Fri, 12 Feb 2010 21:54:09]]> GMT</pubDate>
				<author><![CDATA[ Kleber-rr]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ Cara no meu projeto a formula funciona assim:<br /> <br /> [code]@Formula(value = "(select sum(t.amount) from Contract t)")[/code]<br /> <br /> minha classe toda:<br /> <br /> [code]<br /> package br.com.sansoftware.model;<br /> <br /> import java.io.Serializable;<br /> import java.util.Date;<br /> import java.util.List;<br /> <br /> import javax.persistence.CascadeType;<br /> import javax.persistence.Entity;<br /> import javax.persistence.FetchType;<br /> import javax.persistence.GeneratedValue;<br /> import javax.persistence.Id;<br /> import javax.persistence.ManyToOne;<br /> import javax.persistence.OneToMany;<br /> <br /> import org.hibernate.annotations.Formula;<br /> <br /> <br /> @Entity<br /> public class Contract implements Serializable {<br /> <br /> 	/**<br /> 	 * <br /> 	 */<br /> 	private static final long serialVersionUID = 1L;<br /> <br /> 	@Id<br /> 	@GeneratedValue<br /> 	private Long id;<br /> 	private String number;<br /> 	private Date start;<br /> 	private Long duration;<br /> 	private Integer pay;<br /> 	private Double amount;<br /> 	private Boolean current;<br /> 	private  String contractorText;<br /> <br /> 	@Formula(value = "(select sum(t.amount) from Contract t)")<br /> 	private Double amountSun;<br /> <br /> 	<br /> 	<br /> 	@OneToMany(mappedBy="contract",cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REMOVE}, fetch=FetchType.EAGER )<br /> 	private List&lt;Cashin&gt; cashin;//	<br /> 	<br /> 	public List&lt;Cashin&gt; getCashin() {<br /> 		return cashin;<br /> 	}<br /> 	public void setCashin(List&lt;Cashin&gt; cashin) {<br /> 		this.cashin = cashin;<br /> 	}<br /> 	@ManyToOne(fetch=FetchType.EAGER )<br /> 	private Client client;<br /> <br /> 	<br /> 	<br /> 	<br /> 	<br /> 	<br /> 	<br /> 	<br /> 	@Override<br /> 	public String toString() {<br /> 		return "Contract" + this.getNumber() ;<br /> 	}<br /> 	@Override<br /> 	public int hashCode() {<br /> 		final int prime = 31;<br /> 		int result = 1;<br /> 		result = prime * result + ((client == null) ? 0 : client.hashCode());<br /> 		result = prime * result + ((id == null) ? 0 : id.hashCode());<br /> 		return result;<br /> 	}<br /> 	@Override<br /> 	public boolean equals(Object obj) {<br /> 		if (this == obj)<br /> 			return true;<br /> 		if (obj == null)<br /> 			return false;<br /> 		if (getClass() != obj.getClass())<br /> 			return false;<br /> 		Contract other = (Contract) obj;<br /> 		if (client == null) {<br /> 			if (other.client != null)<br /> 				return false;<br /> 		} else if (!client.equals(other.client))<br /> 			return false;<br /> 		if (id == null) {<br /> 			if (other.id != null)<br /> 				return false;<br /> 		} else if (!id.equals(other.id))<br /> 			return false;<br /> 		return true;<br /> 	}<br /> 	public Long getId() {<br /> 		return id;<br /> 	}<br /> 	public void setId(Long id) {<br /> 		this.id = id;<br /> 	}<br /> 	public String getNumber() {<br /> 		return number;<br /> 	}<br /> 	public void setNumber(String number) {<br /> 		this.number = number;<br /> 	}<br /> 	public Date getStart() {<br /> 		return start;<br /> 	}<br /> 	public void setStart(Date start) {<br /> 		this.start = start;<br /> 	}<br /> 	public Long getDuration() {<br /> 		return duration;<br /> 	}<br /> 	public void setDuration(Long duration) {<br /> 		this.duration = duration;<br /> 	}<br /> 	public Integer getPay() {<br /> 		return pay;<br /> 	}<br /> 	public void setPay(Integer pay) {<br /> 		this.pay = pay;<br /> 	}<br /> 	public Double getAmount() {<br /> 		return amount;<br /> 	}<br /> 	public void setAmount(Double amount) {<br /> 		this.amount = amount;<br /> 	}<br /> 	public Client getClient() {<br /> 		return client;<br /> 	}<br /> 	public void setClient(Client client) {<br /> 		this.client = client;<br /> 	}<br /> 	public String getEquipment() {<br /> 		return Equipment;<br /> 	}<br /> 	public void setEquipment(String equipment) {<br /> 		Equipment = equipment;<br /> 	}<br /> 	public Integer getQuantityEquipment() {<br /> 		return quantityEquipment;<br /> 	}<br /> 	public void setQuantityEquipment(Integer quantityEquipment) {<br /> 		this.quantityEquipment = quantityEquipment;<br /> 	}<br /> 	private String Equipment;<br /> 	private Integer quantityEquipment;<br /> 	<br /> 	public String getContractorText() {<br /> 		return contractorText;<br /> 	}<br /> 	public void setContractorText(String contractorText) {<br /> 		this.contractorText = contractorText;<br /> 	}<br /> 	public Boolean getCurrent() {<br /> 		return current;<br /> 	}<br /> 	public void setCurrent(Boolean current) {<br /> 		this.current = current;<br /> 	}<br /> 	public Double getAmountSun() {<br /> 		return amountSun;<br /> 	}<br /> 	public void setAmountSun(Double amountSun) {<br /> 		this.amountSun = amountSun;<br /> 	}<br /> <br /> 	<br /> }<br /> <br /> <br /> <br /> [/code]]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/997179/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/997179/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Thu, 18 Feb 2010 10:59:52]]> GMT</pubDate>
				<author><![CDATA[ lucianotome]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ Olá pessoal, td bem?<br /> <br /> Passei mto tempo parado sem trabalhar com java, por causa da faculdade... ultimo semestre, TCC... hehehe normal! :D<br /> Então voltei pra essa questão, e estou só corrigindo o erro da síntase SQL comentada acima: faltou o SELECT no começo. Ficaria assim:<br /> [code]SELECT (SELECT sum(valor) FROM lancamento WHERE tipolancamento='entrada') - (SELECT sum(valor) FROM lancamento WHERE tipolancamento='saida')[/code]<br /> <br /> Depois que eu fizer as implementaçoes necessarias aqui no java, inclusive segundo recomendaçoes do amigo lucianotome, eu posto aqui.<br /> <br /> Valeu pessoal.]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/1036037/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/1036037/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Mon, 19 Apr 2010 11:13:43]]> GMT</pubDate>
				<author><![CDATA[ Kleber-rr]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ [quote=lucianotome]Cara no meu projeto a formula funciona assim:<br /> <br /> [code]@Formula(value = "(select sum(t.amount) from Contract t)")[/code]<br /> <br /> minha classe toda:<br /> ...[/quote]<br /> <br /> Olá lucianotome, td bem?<br /> cara, me explica uma coisa: pq tu tens as variaveis amount e amountSun? o amountSun é um campo do seu banco de dados ou ele só é instanciado na classe??<br /> <br /> Valeu.]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/1036063/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/1036063/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Mon, 19 Apr 2010 11:45:49]]> GMT</pubDate>
				<author><![CDATA[ Kleber-rr]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ Pessoal, resolvi o problema parcialmente...<br /> a sintax correta ficou assim:<br /> [code]	@Formula(value = "(select (select sum(v.valor) from lancamento v where v.tipolancamento ='entrada') - (select sum(v.valor) from lancamento v where v.tipolancamento ='saida') ) ")<br /> 	@Column(name = "saldo")<br /> 	private Double saldo;[/code]<br /> <br /> O problema é q apesar de aparecer na minha lista, nao está gravando no banco... <br /> alguma sugestão?<br /> <br /> Valeu pessoal.]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/1036069/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/1036069/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Mon, 19 Apr 2010 12:01:51]]> GMT</pubDate>
				<author><![CDATA[ Kleber-rr]]></author>
			</item>
			<item>
				<title>Re:Movimento caixa em Java com hibernate, mysql e JSF</title>
				<description><![CDATA[ Eae, alguem??]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/196636/1036872/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</guid>
				<link>http://www.guj.com.br/prepost/196636/1036872/removimento-caixa-em-java-com-hibernate-mysql-e-jsf
</link>
				<pubDate><![CDATA[Tue, 20 Apr 2010 12:43:14]]> GMT</pubDate>
				<author><![CDATA[ Kleber-rr]]></author>
			</item>
	</channel>
</rss>
