[DataMapper] Re: Chaning default repository for a model

2008-11-16 Thread kristian
if you add def self.default_repository_name :remote end in your Book model. regards Kristian On Nov 16, 1:51 am, Senny [EMAIL PROTECTED] wrote: Hey there I would like to change the default repository for only one model. That i don't have to specify the repository for each lookop

[DataMapper] ldap adapter

2008-11-17 Thread kristian
' repository. before I just continue to write too much, just one more thing: of course there are still some shortcomings like sort and limits on queries, etc so any interest ? or whom shall/can I contact ? regards Kristian --~--~-~--~~~---~--~~ You received this message

[DataMapper] Re: ldap adapter

2008-11-19 Thread kristian
so just did my first GIT repository ever: http://github.com/mkristian/dm-ldap-adapter/tree/master there is like usual still work to do . . . with regards Kristian On Nov 18, 1:34 am, Michael Klishin [EMAIL PROTECTED] wrote: 2008/11/17 kristian [EMAIL PROTECTED]: so any interest ? or whom

[DataMapper] Re: JRuby and DataMapper

2008-11-22 Thread kristian
integrate with application server transactions via JTA with regards Kristian On Nov 22, 9:46 am, Dan Kubb (dkubb) [EMAIL PROTECTED] wrote: Hi everyone, I've seen a few messages on Twitter and a few IRC conversations about people wanting DataMapper to have JDBC drivers so they could use

[DataMapper] rails 2.3.0 templates for datamapper

2009-02-22 Thread kristian
is when is the next datamapper release planned or is there a way to upload a gem for dm-more/rails_datamapper with the current version 0.9.10 with regards Kristian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[DataMapper] Re: MySQL Server has gone away (where to this time?)

2009-03-10 Thread kristian
. but if things remains like they are right now I go back to my above workaround (after fixing the conncetion leak ;-) with regards Kristian On Mar 9, 2:54 pm, codaniel coryodan...@gmail.com wrote: Thats what I thought at first, so I bumped the max connections up to 100, the most I ever have at one

[DataMapper] Re: datamapper and rails

2009-04-07 Thread kristian
server. i.e. the same model should be DataMapper::Resource and that is why I drop the active_resource. I never considered to have a model be a DataMapper::Resource and ActiveResource at the same time. with regards Kristian with regards Kristian Great job and thanks for your involvement

[DataMapper] Re: How to make dm-ldap-adapter + Slf4r work in merb?

2009-05-20 Thread kristian
also http://slf4r.rubyforge.org/) please let me know if the problem remains. with regards Kristian On May 20, 4:58 am, Ari aepstein...@gmail.com wrote: Anyone with experience setting up dm-ldap-adapter for a merb environment?  I think I've got things set up right, and I go into merb console

[DataMapper] Re: How to make dm-ldap-adapter + Slf4r work in merb?

2009-05-21 Thread kristian
I am sorry for the unspeced code which I rectified. there is a simple default which logs to stderr and the fixed wrapper. finally release a new gem. thanx. Kristian On May 20, 4:54 pm, Ari aepstein...@gmail.com wrote: Thanks, but I've encountered another issue.  Here's the code I'm using

[DataMapper] Re: undefined method `bla_associtation' for nil:NilClass

2009-05-24 Thread kristian
. with regards Kristian On May 23, 7:01 pm, fbettag fr...@bett.ag wrote: class Customer   include DataMapper::Resource   property :id,               Serial, :field = cn   property :name,             String, :field = o   property :unit,             String, :field = ou   has n, :positions   has

[DataMapper] Re: undefined method `bla_associtation' for nil:NilClass

2009-05-25 Thread kristian
I tried to reproduce the error but it works for me: (with slightly modified Customer to fit my ldap config) http://gist.github.com/117884 On May 25, 10:38 am, kristian meier.krist...@gmail.com wrote: I have not used the ldap adapter yet, but with two databases the code works. can please

[DataMapper] Re: error_messages in rails view

2009-06-21 Thread kristian
this is patched if you use the rails_datamapper gem: http://github.com/datamapper/dm-more/blob/459fd82a8923d7bf9c3d6ce64ab5f4bba7b867dc/rails_datamapper/lib/rails_datamapper/validations.rb regards Kristian On Jun 20, 11:39 pm, Hola holacost...@gmail.com wrote: In Rails, you add error

[DataMapper] Re: API Design: Resource#update

2009-08-16 Thread kristian
it difficult to say what I expect, either way sounds wrong to me. Kristian On Aug 15, 1:00 pm, Dan Kubb (dkubb) dan.k...@gmail.com wrote: Hi Everyone, I've got a scenario I wanted to get input on because I'm not sure what the best approach is. This question is specifically for Resource

[DataMapper] Re: Infinite loop caused by saving model belonging to circular relationship

2009-10-08 Thread kristian
hello, I did not see that issue on 0.10.0 (=~ old snapshot) and just today I updated the dm-core gems to 0.10.1 and saw an infinite loop. the code to reproduce the loop is http://pastie.org/646634 but running against the current head 0.10.2 the spec runs through. with regards Kristian PS can

[DataMapper] it looks like optimistic persistence but it is not

2009-10-15 Thread kristian
fails. is that a bug or feature ? regards Kristian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups DataMapper group. To post to this group, send email to datamapper@googlegroups.com To unsubscribe from this group

[DataMapper] xml serializing and naming

2009-10-15 Thread kristian
name from the storage_name use singular and plural for single xml elements and collection elements respectively. maybe there was a reason for the current situation which I try to find out before I prepare a patch for this. regards Kristian --~--~-~--~~~---~--~~ You

[DataMapper] Re: Rails 2.3 + Datamapper / Rails 3

2010-01-31 Thread kristian
for rails 2.3.x have a look at (I am using it for several projects): http://github.com/mkristian/datamapper4rails there is also rails template to get you started: http://github.com/mkristian/datamapper4rails/blob/master/datamapper_rails_templates.rb regards Kristian On Jan 31, 1:27 am, Luca B

[DataMapper] versioning schema

2010-03-08 Thread kristian
[0.10.1, 0.11.0) - see also http://docs.rubygems.org/read/chapter/7#page26 - but seeing the last digit to be the minor version number in DM. so this is just to verify that DM is following such schema or what versioning schema is DM following ? thanx Kristian -- You received this message because

[DataMapper] Re: Datamapper and Rails3 with jruby

2010-03-10 Thread kristian
following error when applying the template in the benchmarking_adapter: /home/kristian/.bundle/jruby/1.8/bundler/gems/dm- rails-6d789ab541218bf52f1038ecd3856026704f4c3b-master/lib/dm-rails/ adapters/benchmarking_adapter.rb:1:18: , unexpected ',' (SyntaxError) define_method method do |*args

[DataMapper] Re: Datamapper and Rails3 with jruby

2010-03-13 Thread kristian
: is there a chance to have a SIMPLE template which just gives me a bare bone rails application (with specs setup) without scaffolding people, running spec and starting the server ? this I could use in my rails-maven-plugin once the respective gems are on gemcutter.org (or so) with regards Kristian PS I am

[DataMapper] Re: getBackRef error on jruby using datamapper validations

2010-03-29 Thread kristian
have a look at the last section of http://github.com/mkristian/ixtlan/blob/master/ixtlan-core/lib/ixtlan/monkey_patches.rb that should fix your problem. regards Kristian On Mar 30, 12:08 am, George george.adam...@softwareunity.com wrote: Does anyone have a solution or workaround

[DataMapper] logging

2010-05-15 Thread kristian
back on slf4j if available and I get nice categories for the ruby part as well. and I saw that there is very little logging done in DM and do I miss the IdentityMap and the connection pool in the debug log !! maybe that was my third point :-) with regards Kristian PS let me know if you WANT

[DataMapper] Re: any body using jruby1.5.0 with datamapper-0.10.2

2010-05-16 Thread kristian
cool, looking forward to it :-) - thanx for all the work . . . . Kristian On May 16, 11:10 am, Dan Kubb (dkubb) dan.k...@gmail.com wrote: kristian, if I seehttp://github.com/sundbp/dm-core/commit/2d01a1d353ce93f287da5e8504288... then I do need to use edge ? correct ? when is the next gem

[DataMapper] Re: uninitialized constant DataMapper after upgrading to 1.0

2010-06-15 Thread kristian
a require 'dm-core' somewhere before you use DataMapper. but I did not read the whole thread here so I might be wrong. regards Kristian On Jun 16, 12:05 am, Dan Sosedov dan.sosed...@gmail.com wrote: Hey Dan, I just reproduced the same issue on a different computer (macbook) Exactly what i did

[DataMapper] dm-migrations to tightly bound to dm-XYZ_DB-adapter

2010-06-25 Thread kristian
into dm-constraints yet but we need this soon too. and I am about add hsqldb support for dm-migrations since these pure java DBs are just a nice alternative to sqlite. regards Kristian -- You received this message because you are subscribed to the Google Groups DataMapper group. To post

[DataMapper] Re: DM character encodings (with sqlserver JRuby)

2010-07-07 Thread kristian
when I run a little test with ruby I see the same as you when I run with -Ku flag set it is OK for both ruby as well jruby. jruby -Ku . or inside the program set $KCODE = 'u' regards Kristian On Jul 7, 7:50 pm, George george.adam...@softwareunity.com wrote: This issue relates to the way

[DataMapper] Re: DM character encodings (with sqlserver JRuby)

2010-07-08 Thread kristian
after retrieving it. regards Kristian On Jul 8, 1:03 pm, George george.adam...@softwareunity.com wrote: Hi Kristian, thanks for the suggestions. Alas neither seemed to have any effect. (Characters are still displaying incorrectlyhttp://yfrog.com/2tld9peven though they are correct

[DataMapper] how can setup DataObjects logger

2010-07-12 Thread kristian
,rails_appender], DataObjects) elsif DataObjects.const_defined?(Postgres) DataObjects::Postgres.logger = logger([appender,rails_appender], DataObjects) end I remember there was a time when datamapper just set the logger for dataobjects. maybe there is a simple to achieve this. regards Kristian

[DataMapper] Re: Ability to close and open database connections in Datamapper?

2010-07-21 Thread kristian
to 1 by adding this in startup of your software: DataObjects::Mysql::Connection.class_eval do def self.pool_size 1 end end if this is really not enough it is possible to flush! the pool but it should do without the flush!. with regards Kristian On Jul 21, 6:27 am, Jordan Ritter j

[DataMapper] Re: dm-rails

2010-09-05 Thread kristian
template where I can choose the DB as well. regards Kristian On Sep 6, 6:40 am, postmodern postmodern.m...@gmail.com wrote:  Does the -m option of rails support file:// URIs? There has to be a way to get the Rails generator to accept a local template. On 09/05/2010 12:15 PM, Ted Han wrote

[DataMapper] Re: Default values that use the id property

2011-04-06 Thread kristian
I was writing without testing it out myself. save! does not do validation and the hope was that it does not trigger atfer save again otherwise you end up in an endless loop. this time I tested it and works for me https://gist.github.com/906962 - Kristian On Apr 7, 1:56 am, DAZ daz4...@gmail.com

[DataMapper] Re: Why does dm-validations seek to support non-DM objects?

2011-05-30 Thread kristian
On May 30, 8:53 pm, Emmanuel Gomez emmanuel.go...@gmail.com wrote: Along these same lines, check out solnic's virtus project, which seeks to bring DM's property API ( validations) to Plain Old Ruby Objects (non-persisted):https://github.com/solnic/virtus cool, that is a missing piece I was

[DataMapper] [ANN] dm-ldap-adapter 0.4.3 released

2011-06-06 Thread kristian
feel free to report any issue with https://github.com/mkristian/dm-ldap-adapter/issues regards, Kristian -- You received this message because you are subscribed to the Google Groups DataMapper group. To post to this group, send email to datamapper@googlegroups.com. To unsubscribe from this group

[DataMapper] Re: Rails 3.1.x

2011-06-16 Thread kristian
I played around with rails template and added JRuby support - maybe that is of some interest, though JRuby and Rails3.1.x is too painful right now. see https://github.com/mkristian/datamapper.github.com/blob/7a005443a5faf9ce9a91a6caa120d77ea77d9328/templates/rails/gemfile.rb - Kristian On Jun

[DataMapper] Re: Rails server disregards default_repository_name on model?

2011-06-28 Thread kristian
to dispatch the models onto the right repository I am overwrite this method def self.repository(name = nil, block) super(:external, block) end so basically I bind the model to the :external repository in static way. the same thing I do for transactions ! maybe that helps. - Kristian On Jun 29, 6

[DataMapper] Re: Rails server disregards default_repository_name on model?

2011-07-01 Thread kristian
sorry for the late replies of my side - bad setup of the group for me. IdentityMaps is wrong - my mistake. nesting happens if you stack two or more of the IM over each other. if IM works is a matter of trust ;-) as Chris said they are not essentlial but nice to have. - Kristian On Jul 1, 7

[DataMapper] Re: Rails server disregards default_repository_name on model?

2011-07-04 Thread kristian
/dm-rails/middleware/identity_map.rb - Kristian On Jul 4, 5:02 pm, Chris Corbyn ch...@w3style.co.uk wrote: Ok, using use Rails::DataMapper::Middleware::IdentityMap, :other It definitely doesn't work, at least in Rails 3.0.9.  You can't pass multiple arguments like that.  I'm curious to know

[DataMapper] Re: Problem when creating a record with custom ID

2011-08-21 Thread kristian
I have the feeling that id=0 is a bad idea since it can be that some lib somewhere will use as trigger to generate an id. if you can use id = 1 as root id then things should work fine for you hope that helps a bit further ;-) - Kristian On Aug 20, 9:26 pm, Javier javiervalenci...@gmail.com

[DataMapper] Re: Log formatting rotation with DataMapper.logger

2011-10-19 Thread kristian
DataMapper.logger = Slf4r::LoggerFacade.new(DataMapper) is how I replace the datamapper logger with the Slf4r facade. -Kristian On Oct 20, 12:38 am, Rhett Sutphin rh...@detailedbalance.net wrote: Hi, I'd like to have my DataMapper-based system log to a file with a custom format

Re: [DataMapper] Digest for datamapper@googlegroups.com - 1 Message in 1 Topic

2011-11-17 Thread kristian
with connection pooling. - Kristian On Fri, Nov 18, 2011 at 3:37 AM, datamapper@googlegroups.com wrote:   Today's Topic Summary Group: http://groups.google.com/group/datamapper/topics Reconnection support for do_jdbc? [1 Update]  Reconnection support for do_jdbc? Michael Leinartas mleinar

Re: [DataMapper] Digest for datamapper@googlegroups.com - 1 Message in 1 Topic

2012-01-16 Thread kristian
I guess you need manual validation of a numerical. for options see: http://rubydoc.info/gems/dm-validations/DataMapper/Validations/ValidatesNumericality - Kristian -- You received this message because you are subscribed to the Google Groups DataMapper group. To post to this group, send email

Re: [DataMapper] get previous/next item in database

2013-01-22 Thread kristian
what about doing something like this : current_id = Audit.first.id next = Audit.first( :id.gt = current_id ) - Kristian -- You received this message because you are subscribed to the Google Groups DataMapper group. To post to this group, send email to datamapper@googlegroups.com

Re: [DataMapper] get previous/next item in database

2013-01-22 Thread kristian
gt == great-than so the previous id you get with previous = Audit.first( :id.lt = current_id ) lt == less-than or lower-than or so and id are unique per definition and they get automatically created by sequence or similar FYI next and previous can be nil ! - Kristian On Tue, Jan 22, 2013

Re: [DataMapper] get previous/next item in database

2013-01-22 Thread kristian
take last instead of first :) Audit.last( :id.lt = 10 ) = #Audit @id=9 - Kristian On Tue, Jan 22, 2013 at 10:43 PM, Alex a...@sicanstudios.com wrote: Thanks guys, the code works, however there is a problem. The .gt works fine, but the .lt always gives me the first element in the db

Re: [DataMapper] get previous/next item in database

2013-01-22 Thread kristian
be aware that timestamps are not unique, i.e. they usually have no millis or nanos. just a thought whether using them to iterate over them. - Kristian On Tue, Jan 22, 2013 at 11:16 PM, kristian m.krist...@web.de wrote: take last instead of first :) Audit.last( :id.lt = 10 ) = #Audit @id=9

Re: [DataMapper] get previous/next item in database

2013-01-22 Thread kristian
is a pleasure :)) -- You received this message because you are subscribed to the Google Groups DataMapper group. To post to this group, send email to datamapper@googlegroups.com. To unsubscribe from this group, send email to datamapper+unsubscr...@googlegroups.com. For more options, visit this

Re: [DataMapper] One last call for help. Problem creating record with association...

2013-02-23 Thread kristian
that are the modified models which works for me class Province include DataMapper::Resource property :name_short, String, key: true, length: 2, unique: true property :name_long, String, length: 1..50 has n, :municipalities, 'Municipality'#, # parent_key:

Re: [DataMapper] One last call for help. Problem creating record with association...

2013-02-23 Thread kristian
just add the key to the model belongs_to :province, 'Province', key: true -- You received this message because you are subscribed to the Google Groups DataMapper group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [DataMapper] One last call for help. Problem creating record with association...

2013-02-23 Thread kristian
@Chris this manual property + setting it is a key did not work with me due to some validations errors -- You received this message because you are subscribed to the Google Groups DataMapper group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [DataMapper] Switch repositories on Rails 3 and set as default

2013-03-02 Thread kristian
why not using an idiom like this DataMapper.repository( current_user.repository.to_sym ) do # do what ever stuff you want to do for that user end assuming the current_user does carry such profile into about the repository. in rails you probably can but it into an around_filter. hope that

Re: [DataMapper] MySQL auto_upgrade! failing

2013-03-26 Thread kristian
frst turn on the logger then you see what SQL is going to DB DataMapper::Logger.new($stdout, :debug) does the same error pop up with a different storage name ? -- You received this message because you are subscribed to the Google Groups DataMapper group. To unsubscribe from this group and

Re: [DataMapper] DM 1.2 and various integration issues?

2013-04-05 Thread kristian
I need to add my two cents. I am currently moving 2-3 three little application from AR to DM1 using rails and once that is done the next step is to move from rails to cuba. all problems on the way could be solved so far. - christian -- You received this message because you are subscribed to the

Re: [DataMapper] Validation Errors - But not sowing in Errors Section + Decimal Values not Saved to DB

2013-06-09 Thread kristian
hi, first you do not have errors the errors Hash in DataMapper::Validations:: ValidationErrors is empty. you can check on errors with object.valid? or object.errors.size 0 try using Float instead of Decimal or play around with :precision or :scale options of Decimal property. I did see

Re: [DataMapper] Newbie: datamapper doesn't tell me why I fail to save

2013-06-14 Thread kristian
since I added the following extension https://github.com/solnic/dm-validations-ext/tree/master/lib to my code, all those errors from associations show up as well, which are otherwise totally as in your case. maybe that helps you as well. - christian -- You received this message because you are

Re: [DataMapper] Newbie: datamapper doesn't tell me why I fail to save

2013-06-15 Thread kristian
yes, the gem does not install because of the gemspec that is why I copied and pasted that file into my project. -christian -- You received this message because you are subscribed to the Google Groups DataMapper group. To unsubscribe from this group and stop receiving emails from it, send an