Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

masse Satriana

Greenhorn
+ Follow
since Sep 21, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by masse Satriana

Hi All,
Does JPA has feature in GeneratedType identity to reset auto-increment ?
For example I have one entity called customers. It contains 10 record.
then I delete record 9th and 10th.
When I insert new Record on customer table, the record should start on record 9 not 11.
In sql query we always using " alter table customer AUTO_INCREMENT=1; "
Any clues in JPA?so it will done automatically everytime I delete and insert operation.

Regards,
Masse Satriana
Hi All,
Case is closed.
This all is my failure not seeing duplicated data on table FormOrder.
All code in my previous post is working fine.

Regards,
Masse Satriana
Hi All,
Is there any clue how using CascadeType in bidirectional relationship?
for example :
I have two tables 1 is Customers and second is FormOrder ( owner of relationship)


The problem is when I insert new record in FormOrder which also specify new Customer, this code should be working. ( since this is not default JPA to persist related entity , so that we are using CascadeType.persist)


The fact is annoying me since there are a message "javax.persistence.EntityExistsException:
Exception Description: Cannot persist detached object"

Any clue would be greatly accepted.

Thanks in advance.
Hi Pascal,
Good Tutorial but I found no source code on tar files (hibernatetutorial-1.4.tar) .
Please provide new ones.

Thanks advance,
Masse
Hi Mita,
Are you coming from Indonesia? your name familiar with me

I suggest not using createQuery() but createNativeQuery().

Rgds,
Masse Satriana
hi Jack,
I think your problem in "ZipcodeApplicationClient".
This is only java class which mean are not managed class.
So you cannot using @PersistanceContext on definition unmanaged class such yours.

Rgds,
Masse Satriana
Hi case is closed by me
This is caused by type 'bit' in tables.
I shortly change to type 'tinyint'. and it works fine.

Thanks
Hi Guys,
Please correct me if there are some mistake by me.
I'm using JPA to use or/m in my projects.
I have table let say " customers" which one of attribute is "valid" with bit type.
In my POJO class its mapped to Boolean type,then I using operation from EntityManager with queryNamed("findByValid");

for example :


The problem is it throw some exception : oracle.toplink.essentials.exceptions.ConversionException

Can I use bit type in database(mysql) and mapped it to Boolean?
Every suggestion would be appreciate.
Thanks in advance.

--- masse satriana ---