"safe", that is, until you have a table with over two billion rows (like we
have at Regenstrief now). :-)

… added migrating from Integer to Long for internal ids to the Towards API
2.0 <https://wiki.openmrs.org/x/SwDX> page.

-Burke

On Wed, Jan 11, 2012 at 5:51 AM, Ben Wolfe <[email protected]> wrote:

> Casting to Number gives you forward and backward compatibility, thats a
> good idea.
>
> I added OpenmrsUtil.convertToInteger(Long longValue) as a "safe" way for
> folks to convert Longs that need to leave the method signatures the same
> (like in core).
>
> I started this page:
> https://wiki.openmrs.org/display/docs/Migration+Guides+for+Developers and
> added a note about this on the 1.8 to 1.9 
> page<https://wiki.openmrs.org/display/docs/1.8+to+1.9>.
> A few others have added to it as well.  As you find things in testing,
> please add to that page.  Also feel free to add other migration guides for
> other versions.  We want to keep those migration guides as small as
> possible.  An ideal upgrade is one with an empty migration guide! (because
> of no backwards incompatible changes, not because we didn't fill it in...)
> :-)
>
> Ben
>
>
> On Tue, Jan 10, 2012 at 3:29 PM, Jeremy Keiper <[email protected]> wrote:
>
>> Mark, I ran into the same problem working with forms in core.  I didn't
>> know about casting to Number ... instead, I used Long.intValue() but I
>> worried about whether that would be good enough.  We should have a strategy
>> that we use in core and for modules to implement.  Casting to Number seems
>> to be solid enough.
>>
>> Jeremy Keiper
>> OpenMRS Core Developer
>> AMPATH / IU-Kenya Support
>>
>>
>>
>> On Wed, Jan 4, 2012 at 3:34 PM, Mark Goodrich <[email protected]> wrote:
>>
>>> Fyi, I just tested the Address Hierarchy module against the 1.9-beta and
>>> ran into some failing unit tests that appear to be caused by the upgrade to
>>> Hibernate 3.5.****
>>>
>>> ** **
>>>
>>> The issue is described here:****
>>>
>>> ** **
>>>
>>> https://forum.hibernate.org/viewtopic.php?f=1&t=1005071&view=next****
>>>
>>> ** **
>>>
>>> The fix seems easy—cast the return values from criteria.list() to Number
>>> instead of Integer—but thought I’d post it here just in case anyone else
>>> runs into the same issue.****
>>>
>>> ** **
>>>
>>> Mark****
>>>
>>> ** **
>>> ------------------------------
>>> Click here to 
>>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
>>> OpenMRS Developers' mailing list
>>
>>
>> ------------------------------
>> Click here to 
>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
>> OpenMRS Developers' mailing list
>>
>
> ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
> OpenMRS Developers' mailing list
>

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to