[OFBiz] Users - SequenceValueItem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Users - SequenceValueItem

Rupert Howell
Hi all,

I've just done a large XML Import and noticed at the end of it that the
SequenceValueItem table wasn't updating with the new values leading to
all sorts of duplicate key errors.
I've had a look through the code and I can't find any methods where the
sequenceId can be reset to the new values that have been imported.
I've ended up changing the values manually for now. Is anyone else
finding this problem?

Regards,

Rupert



 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - SequenceValueItem

David E. Jones

Rupert,

The SequenceValueItem entity's data is only maintained by the  
sequencer object that the Entity Engine's GenericDelegator uses. It  
is not updated as normal inserts and such are done. One problem with  
trying to do this automatically is that the primary key fields are  
text fields, not numbers.

So, what you are seeing is expected. There are ways you can avoid  
these issues, like with prefixes and such. It would be possible to  
write something that would work in some circumstances to update these  
automatically based on existing data, and if you'd like to work on  
that it would be great. I guess so far it hasn't become a priority,  
especially considering that in many circumstances an automated  
approach will not work or may mess up.

-David



On Sep 1, 2005, at 7:11 PM, Rupert Howell wrote:

> Hi all,
>
> I've just done a large XML Import and noticed at the end of it that  
> the SequenceValueItem table wasn't updating with the new values  
> leading to all sorts of duplicate key errors.
> I've had a look through the code and I can't find any methods where  
> the sequenceId can be reset to the new values that have been imported.
> I've ended up changing the values manually for now. Is anyone else  
> finding this problem?
>
> Regards,
>
> Rupert
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users