[Hibernate-JIRA] Commented: (HBX-265) dynamicUpdate property in Entity annotation not work
by radha mohan maheshwari (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-265?page=co... ]
radha mohan maheshwari commented on HBX-265:
--------------------------------------------
I have same Problem.
@Entity
@Table(name="Student")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class Student {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name="ID")
private int id;
@Column(name="NAME" )
private String name;
@ManyToOne(cascade=CascadeType.ALL, targetEntity =Course.class,fetch=FetchType.LAZY)
@JoinColumn(name="COURSEID")
private Course course;
public Student(){
}
public Student(int id, String name, Course course) {
this.id = id;
this.name = name;
this.course = course;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Course getCourse() {
return course;
}
public void setCourse(Course course) {
this.course = course;
}
@Override
public String toString() {
return "Student [id=" + id + ", name=" + name + ", course=" + course
+ "]";
}
}
@Entity
@Table (name="courses")
@org.hibernate.annotations.Entity(dynamicUpdate=true)
public class Course implements java.io.Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@Column(name="ID")
private long id;
@Column(name="name")
private String name;
public Course() {
}
public Course(String courseName) {
this.name = courseName;
}
public Course(int id, String name) {
this.id = id;
this.name = name;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "Course [id=" + id + ", name=" + name + "]";
}
}
Student student = new Student();
student.setId(1);
session.update(student);
I am new with hibernate.plz give helping hand regarding same.
thanks in advance
> dynamicUpdate property in Entity annotation not work
> ----------------------------------------------------
>
> Key: HBX-265
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-265
> Project: Hibernate Tools
> Issue Type: Bug
> Components: annotations (obsolete)
> Affects Versions: 3.0beta1
> Environment: Hibernate 3 hibernate annotations 3.0 beta1
> Reporter: Rogerio Saulo
> Fix For: 3.0beta2
>
>
> The property dynamicUpdate when set on the Entity annotation does not remove NULL columns from the UPDATE statement.
> For the dynamicInsert it is working.
> Below is my POJO, code to execute and generated UPDATE Statement.
> POJO :
> ------------------------------------------------------------------
> @Entity
> @org.hibernate.annotations.Entity ( dynamicInsert = true, dynamicUpdate = true )
> @Table (name = "USERS")
> @javax.persistence.GeneratedIdTable(
> name="GEN_TABLE",
> table = @Table(name="VENUS_IDS"),
> pkColumnName = "KEY_ID",
> valueColumnName = "LAST_VALUE"
> )
> @javax.persistence.TableGenerator(
> name="USERS_GEN",
> tableName="GEN_TABLE",
> pkColumnValue="ID_USER",
> allocationSize=1
> )
> public class UserVO implements Serializable {
>
> private Integer id_user;
> private String login;
> private String email;
> private String passwd;
> private Timestamp creation_timestamp;
> private Timestamp last_change_timestamp;
>
> @Column (name = "creation_timestamp")
> public Timestamp getCreation_timestamp() {
> return creation_timestamp;
> }
> @Column (name = "email")
> public String getEmail() {
> return email;
> }
> @Id (generate=GeneratorType.TABLE, generator="USERS_GEN")
> public Integer getId_user() {
> return id_user;
> }
> @Column (name = "last_change_timestamp")
> public Timestamp getLast_change_timestamp() {
> return last_change_timestamp;
> }
> @Column (name = "login")
> public String getLogin() {
> return login;
> }
> @Column (name = "passwd")
> public String getPasswd() {
> return passwd;
> }
> .... (Setters come here)
> }
> --------------------------------------------------------------------
> Code executing :
> --------------------------------------------------------------------
> UserVO obj = new UserVO();
> obj.setId_user(new Integer(1));
> obj.setEmail("alterado(a)teste.com");
>
> session.update(obj);
> --------------------------------------------------------------------
> Generated update statement :
> Hibernate: update USERS set creation_timestamp=?, last_change_timestamp=?, email=?, login=?, passwd=? where id_user=?
> --------------------------------------------------------------------
> Thanks in advance.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[Hibernate-JIRA] Assigned: (HHH-6700) mysql test failures
by Strong Liu (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6700?page=c... ]
Strong Liu reassigned HHH-6700:
-------------------------------
Assignee: Strong Liu
> mysql test failures
> -------------------
>
> Key: HHH-6700
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6700
> Project: Hibernate Core
> Issue Type: Bug
> Environment: MySql 51
> Reporter: Strong Liu
> Assignee: Strong Liu
>
> org.hibernate.test.hql.ASTParserLoadingTest.testJPAQLQualifiedIdentificationVariablesControl
> org.hibernate.test.hql.ASTParserLoadingTest.testPaginationWithPolymorphicQuery
> org.hibernate.test.hql.ASTParserLoadingTest.testImplicitPolymorphism
> org.hibernate.test.hql.ASTParserLoadingTest.testCachedJoinedAndJoinFetchedManyToOne
> org.hibernate.test.hql.ASTParserLoadingTest.testCachedJoinedAndJoinFetchedOneToMany
> org.hibernate.test.id.uuid.sqlrep.sqlbinary.UUIDBinaryTest.testUsage
> org.hibernate.test.id.uuid.strategy.CustomStrategyTest.testUsage
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testLazy
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testCustomColumnReadAndWrite
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testFetchAll
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testLazyManyToOne
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testPropertyInitialized
> org.hibernate.test.querycache.QueryCacheTest.testCaseInsensitiveComparison
> org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testTextTypeInSQLQuery
> org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testImageTypeInSQLQuery
> org.hibernate.test.tm.CMTTest.testConcurrentCachedDirtyQueries
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testScalarStoredProcedure
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testParameterHandling
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testEntityStoredProcedure
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testHandSQL
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[Hibernate-JIRA] Assigned: (HHH-6700) mysql test failures
by Strong Liu (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6700?page=c... ]
Strong Liu reassigned HHH-6700:
-------------------------------
Assignee: (was: Strong Liu)
> mysql test failures
> -------------------
>
> Key: HHH-6700
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6700
> Project: Hibernate Core
> Issue Type: Bug
> Environment: MySql 51
> Reporter: Strong Liu
>
> org.hibernate.test.hql.ASTParserLoadingTest.testJPAQLQualifiedIdentificationVariablesControl
> org.hibernate.test.hql.ASTParserLoadingTest.testPaginationWithPolymorphicQuery
> org.hibernate.test.hql.ASTParserLoadingTest.testImplicitPolymorphism
> org.hibernate.test.hql.ASTParserLoadingTest.testCachedJoinedAndJoinFetchedManyToOne
> org.hibernate.test.hql.ASTParserLoadingTest.testCachedJoinedAndJoinFetchedOneToMany
> org.hibernate.test.id.uuid.sqlrep.sqlbinary.UUIDBinaryTest.testUsage
> org.hibernate.test.id.uuid.strategy.CustomStrategyTest.testUsage
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testLazy
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testCustomColumnReadAndWrite
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testFetchAll
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testLazyManyToOne
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testPropertyInitialized
> org.hibernate.test.querycache.QueryCacheTest.testCaseInsensitiveComparison
> org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testTextTypeInSQLQuery
> org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testImageTypeInSQLQuery
> org.hibernate.test.tm.CMTTest.testConcurrentCachedDirtyQueries
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testScalarStoredProcedure
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testParameterHandling
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testEntityStoredProcedure
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testHandSQL
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[Hibernate-JIRA] Created: (HHH-3637) Union in where doesn't works for Sybase, need to evict test case
by Juraci Paixao Krohling (JIRA)
Union in where doesn't works for Sybase, need to evict test case
----------------------------------------------------------------
Key: HHH-3637
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3637
Project: Hibernate Core
Issue Type: Improvement
Components: testsuite
Environment: Sybase ASE 15.0.2
Reporter: Juraci Paixao Krohling
Assignee: Juraci Paixao Krohling
It seems that Sybase doesn't supports UNION inside WHERE clauses, causing the test DynamicFilterTest#testSqlSyntaxOfFiltersWithUnions to fail. The scenario for this test case is not described in the documentation, but I would expect it to work:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter....
The query is:
select
category0_.CAT_ID as CAT1_6_,
category0_.name as name6_,
category0_.eff_start_dt as eff3_6_,
category0_.eff_end_dt as eff4_6_
from
CATEGORY category0_
where
'abc' in (
select
d.reg
from
department d
where
(
d.dept_id=123
)
union
select
p.name
from
sales_person p
)
If executed only the queries from inside the where clause (the two selects with union), it works as expected. Also, if removed the union and one of the queries inside the where, it works as expected. So, the problem happens only when using union inside a where clause.
For now, I'd suggest to evict this test for Sybase.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[Hibernate-JIRA] Updated: (HHH-6700) mysql test failures
by Emmanuel Bernard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6700?page=c... ]
Emmanuel Bernard updated HHH-6700:
----------------------------------
Description:
org.hibernate.test.hql.ASTParserLoadingTest.testJPAQLQualifiedIdentificationVariablesControl
org.hibernate.test.hql.ASTParserLoadingTest.testPaginationWithPolymorphicQuery
org.hibernate.test.hql.ASTParserLoadingTest.testImplicitPolymorphism
org.hibernate.test.hql.ASTParserLoadingTest.testCachedJoinedAndJoinFetchedManyToOne
org.hibernate.test.hql.ASTParserLoadingTest.testCachedJoinedAndJoinFetchedOneToMany
org.hibernate.test.id.uuid.sqlrep.sqlbinary.UUIDBinaryTest.testUsage
org.hibernate.test.id.uuid.strategy.CustomStrategyTest.testUsage
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testLazy
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testCustomColumnReadAndWrite
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testFetchAll
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testLazyManyToOne
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testPropertyInitialized
org.hibernate.test.querycache.QueryCacheTest.testCaseInsensitiveComparison
org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testTextTypeInSQLQuery
org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testImageTypeInSQLQuery
org.hibernate.test.tm.CMTTest.testConcurrentCachedDirtyQueries
org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testScalarStoredProcedure
org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testParameterHandling
org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testEntityStoredProcedure
org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testHandSQL
was:
org.hibernate.test.hql.ASTParserLoadingTest.testJPAQLQualifiedIdentificationVariablesControl
org.hibernate.test.hql.ASTParserLoadingTest.testPaginationWithPolymorphicQuery
org.hibernate.test.hql.ASTParserLoadingTest.testImplicitPolymorphism
org.hibernate.test.hql.ASTParserLoadingTest.testCachedJoinedAndJoinFetchedManyToOne
org.hibernate.test.hql.ASTParserLoadingTest.testCachedJoinedAndJoinFetchedOneToMany
org.hibernate.test.id.uuid.sqlrep.sqlbinary.UUIDBinaryTest.testUsage
org.hibernate.test.id.uuid.strategy.CustomStrategyTest.testUsage
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testLazy
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testCustomColumnReadAndWrite
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testFetchAll
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testLazyManyToOne
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testPropertyInitialized
org.hibernate.test.querycache.QueryCacheTest.testCaseInsensitiveComparison
org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testTextTypeInSQLQuery
org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testImageTypeInSQLQuery
org.hibernate.test.tm.CMTTest.testConcurrentCachedDirtyQueries
org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testScalarStoredProcedure
org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testParameterHandling
org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testEntityStoredProcedure
org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testHandSQL
Issue Type: Bug (was: Sub-task)
> mysql test failures
> -------------------
>
> Key: HHH-6700
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6700
> Project: Hibernate Core
> Issue Type: Bug
> Environment: MySql 51
> Reporter: Strong Liu
> Assignee: Strong Liu
>
> org.hibernate.test.hql.ASTParserLoadingTest.testJPAQLQualifiedIdentificationVariablesControl
> org.hibernate.test.hql.ASTParserLoadingTest.testPaginationWithPolymorphicQuery
> org.hibernate.test.hql.ASTParserLoadingTest.testImplicitPolymorphism
> org.hibernate.test.hql.ASTParserLoadingTest.testCachedJoinedAndJoinFetchedManyToOne
> org.hibernate.test.hql.ASTParserLoadingTest.testCachedJoinedAndJoinFetchedOneToMany
> org.hibernate.test.id.uuid.sqlrep.sqlbinary.UUIDBinaryTest.testUsage
> org.hibernate.test.id.uuid.strategy.CustomStrategyTest.testUsage
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testLazy
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testCustomColumnReadAndWrite
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testFetchAll
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testLazyManyToOne
> org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testPropertyInitialized
> org.hibernate.test.querycache.QueryCacheTest.testCaseInsensitiveComparison
> org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testTextTypeInSQLQuery
> org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testImageTypeInSQLQuery
> org.hibernate.test.tm.CMTTest.testConcurrentCachedDirtyQueries
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testScalarStoredProcedure
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testParameterHandling
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testEntityStoredProcedure
> org.hibernate.test.sql.hand.custom.mysql.MySQLCustomSQLTest.testHandSQL
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months