Rahul Babbar wrote:Hi,
Most of the things seem right...
Is the User table is already present in your database or are you trying to create it using Hibernate.
I have a suggestion...change the table name in your hbm and the database to a name other than 'USER'..
to
<class name="User" table="USER_LOGIN">
or something like that..and make sure the table name in your DB is USER_LOGIN(or something else, but not USER)
I vaguely remember that sometime back, i was getting some weird error by using Hibernate with MySQL while trying to name the table name as USER....and hibernate complained...and changing the table name did the trick...
It sounds silly, but is true..(as far as i remember)
Rob Prime wrote:Both MyThread instances synchronize on itself - their synchronization is separated.
The following will work as you expect:
This is because the same MyThread instance is used (as a Runnable) in two different threads.
Amit Ghorpade wrote:By making a variable transient, you indicate that the variable does not add to the object's state and hence should not be saved/serialized.
Now when restoring the same object, transient variable value is not available and it gets the same treatment as class variables get during initialization and gets assigned to default value.
Hope this helps
Ankit Garg wrote:From where did the class Poddle come. You didn't show poddle class in your code...
Vierda Mila wrote:Hi N path,
one rule you have to remember here that polymorphism is not apply for generic type.
if you provide as per below it will result compile error :
Cage<Animal> cg1 = new Cage<Dog>();
but these example is ok :
Cage <Animal> cg1 = new Cage <Animal>();
Cage<? extends Animal cg1 = new Cage <Dog>();
please check this one for further information
regards,
-Vierda-