Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

Mirror service and generated ID

Does Gigaspaces not like auto generated ID column?

I have a method in a persisted SpaceClass that has the following annotation:

@Column(name = "id")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getId() {
    return id;

I can see from the console that mirror service got the entry. But it doesn't seem to do anything with or give any error. It just doesn't appear in the database. If I change the id to an assigned value, it works fine.



{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2420]{quote}

asked 2008-06-26 19:26:16 -0500

noiseba's avatar

updated 2013-08-08 09:52:00 -0500

jaissefsfex's avatar
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

When a space configured with ExternalDataSource or using the Mirror Service you should generate the Space object Id yourself.
This means you should annotate the IF field using:
@SpaceId (autogenerate=false)
and place a unique value into the field prior writing the object into the space.

See more:


answered 2008-06-26 19:42:12 -0500

shay hassidim's avatar
edit flag offensive delete link more


Thanks Shay.

I think I read it before but totally forgot about it.

noiseba's avatar noiseba  ( 2008-06-27 01:04:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2008-06-26 19:26:16 -0500

Seen: 449 times

Last updated: Jun 26 '08